Global.Church Developer Portal
Global.Church API

Commitments

Endpoint:https://api.global.church

List commitments

GET
https://api.global.church
/v0/commitments

Returns at:Commitment instances from GraphDB (https://data.global.church/commitments/). Optional filters: orgUri, status, concernsNeedId, limit.

List commitments › query Parameters

  • orgUristring

    Filter by committing organization URI.

  • statusstring · enum

    Filter by commitment status.

    Enum values:
    declared
    funded
    in_progress
    fulfilled
    partially_fulfilled
    abandoned
    expired
  • concernsNeedIdstring · uuid

    Filter by the UUID of the need this commitment is linked to.

  • limitinteger · min: 1 · max: 200

    Max rows to return (default 50, max 200).

List commitments › Headers

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

List commitments › Responses

List of commitments

  • commitmentsobject[] · required
  • totalinteger · required

Submit commitment

POST
https://api.global.church
/v0/commitments

Creates a new at:Commitment for an organization, optionally linked to a prior at:Need. The person must be a steward of the organization in the Home, which is checked at request time. Send the signed-in person's Home sign-in token in the x-home-id-token header; the gateway verifies it and refuses the request with 401 without a valid one. The acting person is the token's subject: userId is set from it and any userId sent in the body is ignored.

Submit commitment › Headers

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

  • x-home-id-tokenstring · required

    The signed-in person's sign-in token (the ES256 id_token issued by the Home). The gateway verifies its signature, issuer, audience and expiry, and takes the acting person from its subject.

Submit commitment › Request Body

  • orgUristring · required

    GraphDB URI of the committing organization

  • orgNamestring · required

    Display name of the organization

  • commitmentDescriptionstring · required
  • acceleratorScopestring[] · minItems: 1 · required

    Phases of Engagement Toolkit accelerator domain codes (the twelve top concepts of poe:EngagementAcceleratorScheme: PRA … MKT); the only accepted values since ontology v0.51.0.

    Enum values:
    PRA
    SRA
    VIS
    MNE
    MOB
    COL
    COM
    CTX
  • concernsNeedIdstring · uuid

    Optional — UUID of a at:Need this commitment is responding to.

  • concernsPeopleGroupRop3string[]
  • concernsCountryCodestring[]
  • targetCompletionDatestring · date

    Optional ISO YYYY-MM-DD target completion date.

Submit commitment › Responses

Commitment created

  • commitmentIdstring · uuid · required
  • statusstring · enum · required
    Enum values:
    declared

CORS preflight for commitments

OPTIONS
https://api.global.church
/v0/commitments

CORS preflight for commitments › Responses

No content

No data returned

Update commitment status

POST
https://api.global.church
/v0/commitments/status

Transitions a at:Commitment between declared / funded / in_progress / fulfilled / partially_fulfilled / abandoned / expired. The person must be a steward of the commitment's owning organization in the Home, which is checked at request time. No state-machine enforcement — any status is reachable from any status. Send the signed-in person's Home sign-in token in the x-home-id-token header; the gateway verifies it and refuses the request with 401 without a valid one. The acting person is the token's subject: userId is set from it and any userId sent in the body is ignored.

Update commitment status › Headers

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

  • x-home-id-tokenstring · required

    The signed-in person's sign-in token (the ES256 id_token issued by the Home). The gateway verifies its signature, issuer, audience and expiry, and takes the acting person from its subject.

Update commitment status › Request Body

  • commitmentIdstring · uuid · required
  • statusstring · enum · required
    Enum values:
    declared
    funded
    in_progress
    fulfilled
    partially_fulfilled
    abandoned
    expired

Update commitment status › Responses

Status updated

  • commitmentIdstring · uuid · required
  • statusstring · required

CORS preflight for commitment status

OPTIONS
https://api.global.church
/v0/commitments/status

CORS preflight for commitment status › Responses

No content

No data returned