Esenda

Stores

Get, Post, and Patch Stores for each Organisation

Stores are used as a way to create a subgroup of elements (eg. Orders, Payout Routes, etc) within an Organisation. They are designed to be used as a way to help separate payments for the purpose of reporting. In a scenario where you do not have a requirement to report at a lower level than the Organisation, only create one store. We will then use this single store as the default for all other operations.

Fetch all Stores

Endpoint

GET /v2/partner/organisations/{shortcode}/stores

Use the production or sandbox base URL from API conventions. Authenticate with your partner token from Authentication.

Path parameters

ParameterTypeRequiredDescription
shortcodestringYesThe organisation's shortcode.

Response

The response returns an array of objects. Every object is one Store.

FieldTypeDescription
idstringThe identifier to send as store_id in request bodies, or as store-id when filtering list endpoints.
external_idstringA unique identifier for your reference.
[
  {
    "id": "a7881587-55e5-4a39-b75f-cfc5b39de5c3",
    "external_id": "example store A"
  },
  {
    "id": "ea6cf5e4-f582-4c2e-ad03-fec41f890183",
    "external_id": "example store B"
  }
]

Example request

curl --request GET \
  --url https://api.esenda.com/v2/partner/organisations/ABCSCH/stores \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Errors

StatusWhen
401 UnauthorizedThe JWT is missing, invalid or expired.
403 Permission DeniedThe organisation isn't connected to your partner account.
404 Not FoundYou haven't agreed signed fees with the organisation.

See errors for the error response format.

Create or Update a Store

Create

When creating a new Store, submit a request. We will return the Store ID that you should use when leveraging stores in other requests.

POST /v2/partner/organisations/{shortcode}/stores

Request body

Send a JSON body with Content-Type: application/json.

FieldTypeRequiredDescription
external_idstringYesA unique identifier for your reference.

Example

{
  "external_id": "partner-generated-uuid-alpha"
}

Response

We will respond with the Store ID and your provided external_id.

{
  "id": "a7881587-55e5-4a39-b75f-cfc5b39de5c3",
  "external_id": "example store A"
}

Update

When updating a Store, provide the Store ID in the URL. Provide the updated external_id in the body of the Request. We will return the Store ID that you should use when leveraging stores in other requests.

PATCH /v2/partner/organisations/{shortcode}/stores/{id}

Request

Send a JSON body with Content-Type: application/json.

FieldTypeRequiredDescription
external_idstringYesA unique identifier for your reference.

Example

{
  "external_id": "example store F"
}

Response

We will respond with the Store ID and your provided external_id.

{
  "id": "a7881587-55e5-4a39-b75f-cfc5b39de5c3",
  "external_id": "example store F"
}

On this page