Otter Organization Endpoints API

Endpoints to interact with with organizations/brands/stores and with integration connections.

OpenAPI Specification

otter-organization-endpoints-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Public Account Pairing Endpoints Organization Endpoints API
  description: "# Overview\n\nThe API endpoints are developed around [RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer) principles secure via the OAuth2.0 protocol.\n\nBeyond the entry points, the API also provides a line of communication into your system via [webhooks](https://en.wikipedia.org/wiki/Webhook).\n\nFor testing purposes, we offer a staging environment. Also, more detailed information about the business rules and workflows can be found on the [**Documentation Section**](/docs/)\n\n## Versioning\nEach API is versioned individually, but we follow these rules:\n- Non breaking changes (eg: adding new fields) are added in the current version without previous communication\n- Breaking changes (fields removal, semantic changed or schema update) have the version incremented\n- Users will be notified about new versions and will be given time to migrate (the time will be set on a case by case basis)\n- Once users migrate to the new version, we will deprecate the old ones\n- Once there is a new version for an API, we won't accept new integrations targeting old versions\n\n## API General Definitions\nThe APIs use resource-oriented URLs communicating, primarily, via JSON and leveraging the HTTP headers, [response status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status), and verbs.\n\nTo exemplify how the API is to be consumed, consider a fake GET resource endpoint invocation below:\n\n```\ncurl --request GET 'https://{{public-api-url}}/v1/resource/123' \\\n--header 'Authorization: Bearer 34fdabeeafds=' --header 'X-Store-Id: 321'\n```\n\n|      Header      | Description |\n| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n|`Authorization`   | Standard HTTP header is used to associate the request with the originating invoker. The content of this header is a `Bearer` token generated from you client_secret, defined in the [API Auth](#/section/Guides/API-Auth) guide.|\n|`X-Store-Id`      | The ID of the store in your system this call acts on behalf of. |\n\n_All resource endpoints expect the `Authorization` header, the remaining headers are explicitly stated in the individual endpoint documentation section._\n\nWith these headers, the system will:\n - Validate the client token, making sure the call is originating from a trusted source.\n - Validate that the Application has the permission to access the `v1/resource/{id}` resource via the Application's pre-configured scopes.\n - Translate your X-Store-Id to our internal store ID (e.g. `AAA`).\n - Validate and retrieve resource `AAA`, that is associated to your Application via store id `321`.\n\nPOST/PUT methods will look similar to the GET calls, but they'll take in a body in the HTTP request (default to the application/json content-type).\n\n```\ncurl --location --request POST 'https://{{public-api-url}}/v1/resource' \\\n--header 'Authorization: Bearer 34fdabeeafds=' --header 'X-Store-Id: 321'\n--data '{\"foo\": \"bar\"}'\n```\n\n## API Authentication/Authorization\n\n<SecurityDefinitions />\n\n## Webhook\n\nThe Public API is able to send notifications to your system via HTTP POST requests.\n\nEvery webhook is signed using HMAC-SHA256 that is present in the header `X-HMAC-SHA256`, and you can also authenticate the requests using Basic Auth, Bearer Token or HMAC-SHA1 (legacy). Please, refer to [**Webhook Authentication Guide**](/docs/guides-webhook-authentication/) for more details.\n\n_Please work with your Account Representative to setup your Application's Webhook configurations._\n\n```\nExample Base-URL = https://{{your-server-url}}/webhook\n```\n\n### Notification Schema\n\n| **Name**                | **Type** | **Description**                                                      |\n| ------------------------| ---------| -------------------------------------------------------------------- |\n| eventId                 | string   | Unique id of the event.                                              |\n| eventTime               | string   | The time the event occurred.                                         |\n| eventType               | string   | The type of event (e.g. create_order).                               |\n| metadata.storeId        | string   | Id of the store for which the event is being published.              |\n| metadata.applicationId  | string   | Id of the application for which the event is being published.        |\n| metadata.resourceId     | string   | The external identifier of the resource that this event refers to.   |\n| metadata.resourceHref   | string   | The endpoint to fetch the details of the resource.                   |\n| metadata.payload        | object   | The event object which will be detailed in each Webhook description. |\n\n### Notification Request Example\n\n```\ncurl --location --request POST 'https://{{your-server-url}}/webhook' \\\n--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36' \\\n--header 'Authorization: MAC <hash signature>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n   \"eventId\": \"123456\",\n   \"eventTime\": \"2020-10-10T20:06:02:123Z\",\n   \"eventType\": \"orders.new_order\",\n   \"metadata\": {\n      \"storeId\": \"755fd19a-7562-487a-b615-171a9f89d669\",\n      \"applicationId\": \"e22f94b3-967c-4e26-bf39-9e364066b68b\",\n      \"resourceHref\": \"https://{{public-api-url}}/v1/orders/bf9f1d81-f213-496e-a026-91b6af44996c\",\n      \"resourceId\": \"bf9f1d81-f213-496e-a026-91b6af44996c\",\n      \"payload\": {}\n   }\n}\n```\n\n### Expected Response\n\nThe partner application should return an HTTP 200 response code with an empty response body to acknowledge receipt of the webhook event.\n## Rate Limiting\nPlease, refer to [**Rate Limiting Guide**](/docs/guides-rate-limiting/) for more details.\n\n## Error codes\nThe APIs use standard HTTP status codes to indicate the success or failure of a request. Error codes are divided into two categories: 4XX codes for client-side errors and 5xx codes for server-side errors.\n### 4XX Client-Side Errors\nClient-side errors are indicated by status codes in the 4xx range. These errors are typically the result of a problem with the request made by your application.\nIf a client-side error occurs, our API will return a response that includes an appropriate error message. This message will provide information about the cause of the error. The aim of these messages is to assist you in identifying and resolving the issue.\nFor example, if you submit a request with missing or invalid parameters, you might receive a 400 Bad Request error with a message indicating which parameters were missing or incorrect.\n### 5XX Server-Side Errors\nServer-side errors are represented by status codes in the 5xx range. These errors suggest a problem with our server, not with your application's request.\nServer-side errors are typically transient, meaning they are temporary. If a server-side error occurs, we recommend that the client retries the same request with the exact same parameters.\nFor example, if you get a 500 Internal Server Error, it's possible that our server is suffering a temporary problem. In such cases, retrying the request after a short delay is often successful.\nIf you continually receive server-side errors, reach out to our support team for further assistance."
  version: v1
  license:
    name: Proprietary
  contact:
    name: Kin Lane
    email: kin@apievangelist.com
  x-generated-from: documentation
  x-source-url: https://developer-guides.tryotter.com/api-reference/
  x-last-validated: '2026-06-03'
servers:
- url: https://{public-api-url}/
  description: Otter Public API base URL. The concrete host is provisioned per integration partner/account via your Otter account representative; substitute the value provided during onboarding.
  variables:
    public-api-url:
      default: public-api-url
      description: Account-specific Public API host provided by Otter during onboarding.
tags:
- name: Organization Endpoints
  description: Endpoints to interact with with organizations/brands/stores and with integration connections.
  x-displayName: Organization
paths:
  /organization/v1/organization:
    get:
      tags:
      - Organization Endpoints
      summary: Otter Get the Organization Managed by the User.
      operationId: organizationGetOrganization
      responses:
        '200':
          description: The organization managed by the user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
              examples:
                OrganizationGetOrganization200Example:
                  summary: Default organizationGetOrganization 200 response
                  x-microcks-default: true
                  value:
                    id: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
                    name: Organization name 1
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
      security:
      - OAuth2.0:
        - organization.read
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /organization/v1/organization/brands/{brandId}:
    get:
      tags:
      - Organization Endpoints
      summary: Otter Get a Brand of the Organization Managed by the User.
      operationId: organizationGetBrand
      parameters:
      - $ref: '#/components/parameters/brandId'
      responses:
        '200':
          description: The requested brand.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Brand'
              examples:
                OrganizationGetBrand200Example:
                  summary: Default organizationGetBrand 200 response
                  x-microcks-default: true
                  value:
                    id: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
                    name: Brand name 1
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
      security:
      - OAuth2.0:
        - organization.read
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /organization/v1/organization/brands:
    get:
      tags:
      - Organization Endpoints
      summary: Otter Get the List of Brands of the Organization Managed by the User.
      operationId: organizationListBrands
      parameters:
      - $ref: '#/components/parameters/limit-2'
      - $ref: '#/components/parameters/opaquePaginationToken'
      responses:
        '200':
          description: The list of brands that belong to the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBrandsResponse'
              examples:
                OrganizationListBrands200Example:
                  summary: Default organizationListBrands 200 response
                  x-microcks-default: true
                  value:
                    items:
                    - id: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
                      name: Brand name 1
                    offsetToken: H12MAF2fFaFFFa
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
      security:
      - OAuth2.0:
        - organization.read
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /organization/v1/organization/brands/{brandId}/stores/{storeId}:
    get:
      tags:
      - Organization Endpoints
      summary: Otter Get a Store of the Organization Managed by the User.
      operationId: organizationGetStore
      parameters:
      - $ref: '#/components/parameters/brandId'
      - $ref: '#/components/parameters/storeId'
      responses:
        '200':
          description: The requested store.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Store'
              examples:
                OrganizationGetStore200Example:
                  summary: Default organizationGetStore 200 response
                  x-microcks-default: true
                  value:
                    id: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
                    name: Store name 1
                    address:
                      fullAddress: 123 Sample Street Ste 100, San Francisco, CA 94103
                      postalCode: '20500'
                      city: Washington
                      state: DC
                      countryCode: US
                      addressLines:
                      - 1600 Pennsylvania Avenue NW
                      - 123 Sample Street Ste 100, San Francisco, CA 94103
                      linesOfAddress:
                      - 1600 Pennsylvania Avenue NW
                      - 123 Sample Street Ste 100, San Francisco, CA 94103
                      location: {}
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
      security:
      - OAuth2.0:
        - organization.read
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /organization/v1/organization/brands/{brandId}/stores:
    get:
      tags:
      - Organization Endpoints
      summary: Otter Get the List of Stores of a Given Brand.
      operationId: organizationListStores
      parameters:
      - $ref: '#/components/parameters/brandId'
      - $ref: '#/components/parameters/limit-2'
      - $ref: '#/components/parameters/opaquePaginationToken'
      responses:
        '200':
          description: The list of stores of the selected brand.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListStoresResponse'
              examples:
                OrganizationListStores200Example:
                  summary: Default organizationListStores 200 response
                  x-microcks-default: true
                  value:
                    items:
                    - id: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
                      name: Store name 1
                      address: {}
                    offsetToken: H12MAF2fFaFFFa
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
      security:
      - OAuth2.0:
        - organization.read
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /organization/v1/organization/brands/{brandId}/stores/{storeId}/connection:
    get:
      tags:
      - Organization Endpoints
      summary: Otter Get the Partner Application Connection with the Selected Store.
      operationId: organizationGetConnection
      parameters:
      - $ref: '#/components/parameters/brandId'
      - $ref: '#/components/parameters/storeId'
      responses:
        '200':
          description: The information about the partner application connection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Connection'
              examples:
                OrganizationGetConnection200Example:
                  summary: Default organizationGetConnection 200 response
                  x-microcks-default: true
                  value:
                    storeId: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
      security:
      - OAuth2.0:
        - organization.service_integration
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      tags:
      - Organization Endpoints
      summary: Otter Create a Connection for the Partner Application with the Selected Store.
      operationId: organizationCreateConnection
      parameters:
      - $ref: '#/components/parameters/brandId'
      - $ref: '#/components/parameters/storeId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConnectionRequest'
            examples:
              OrganizationCreateConnectionRequestExample:
                summary: Default organizationCreateConnection request
                x-microcks-default: true
                value:
                  storeId: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
        required: true
      responses:
        '204':
          description: The connection was successfully created.
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          $ref: '#/components/responses/409'
        '422':
          $ref: '#/components/responses/422'
      security:
      - OAuth2.0:
        - organization.service_integration
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      tags:
      - Organization Endpoints
      summary: Otter Delete the Connection Between the Partner Application and the Selected Store.
      operationId: organizationDeleteConnection
      parameters:
      - $ref: '#/components/parameters/brandId'
      - $ref: '#/components/parameters/storeId'
      responses:
        '204':
          description: The connection was successfully deleted.
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
      security:
      - OAuth2.0:
        - organization.service_integration
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Organization:
      required:
      - id
      - name
      type: object
      properties:
        id:
          type: string
          description: Organization identifier.
          example: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
        name:
          type: string
          description: Organization name.
          example: Organization name 1
    Address:
      type: object
      nullable: true
      properties:
        fullAddress:
          type: string
          nullable: true
          description: Full, human comprehensible address. It is usually formatted in the order appropriate for your locale.
          example: 123 Sample Street Ste 100, San Francisco, CA 94103
        postalCode:
          type: string
          description: Postal code of the address.
          example: '20500'
        city:
          type: string
          description: The city/town portion of the address.
          example: Washington
        state:
          type: string
          description: Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, or a prefecture.
          example: DC
        countryCode:
          type: string
          description: CLDR country code. See http://cldr.unicode.org/
          example: US
        addressLines:
          type: array
          nullable: true
          description: Address lines (e.g. street, PO Box, or company name) or the full single line address (e.g. street, city, state, country, zip).
          example:
          - 1600 Pennsylvania Avenue NW
          - 123 Sample Street Ste 100, San Francisco, CA 94103
          items:
            type: string
        linesOfAddress:
          type: array
          nullable: true
          deprecated: true
          description: 'Deprecated: use addressLines. Address lines (e.g. street, PO Box, or company name) or the full single line address (e.g. street, city, state, country, zip).'
          example:
          - 1600 Pennsylvania Avenue NW
          - 123 Sample Street Ste 100, San Francisco, CA 94103
          items:
            type: string
        location:
          $ref: '#/components/schemas/Location'
      description: Order delivery address.
    Brand:
      required:
      - id
      - name
      type: object
      properties:
        id:
          type: string
          description: Brand identifier.
          example: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
        name:
          type: string
          description: Brand name.
          example: Brand name 1
    ErrorDetail:
      type: object
      properties:
        attribute:
          type: string
          description: The error attribute.
          example: Order Currency Code
        message:
          type: string
          description: The error detail description.
          example: Order Currency Code must be exactly 3 characters
      description: The error detail response object.
    ErrorMessage:
      type: object
      properties:
        message:
          type: string
          description: The error description.
          example: The request body is invalid.
        details:
          type: array
          description: The error details.
          items:
            $ref: '#/components/schemas/ErrorDetail'
      description: The error response object.
    Location:
      required:
      - latitude
      - longitude
      type: object
      nullable: true
      properties:
        latitude:
          type: number
          description: The latitude of the location.
          format: double
          example: 38.8977
        longitude:
          type: number
          description: The longitude of the location.
          format: double
          example: 77.0365
      description: Latitude and longitude of the address.
    ListBrandsResponse:
      required:
      - items
      type: object
      properties:
        items:
          type: array
          description: Array of brands.
          items:
            $ref: '#/components/schemas/Brand'
        offsetToken:
          type: string
          description: Opaque token used to fetch the following page. If not set, no more brands are available.
          example: H12MAF2fFaFFFa
    ListStoresResponse:
      required:
      - items
      type: object
      properties:
        items:
          type: array
          description: Array of Stores
          items:
            $ref: '#/components/schemas/Store'
        offsetToken:
          type: string
          description: Opaque token used to fetch the following page. If not set, no more stores are available.
          example: H12MAF2fFaFFFa
    CreateConnectionRequest:
      required:
      - storeId
      type: object
      properties:
        storeId:
          type: string
          description: The unique identifier of the store in the partner application. This is the ID, along with the Application ID, used to match the correct store when performing operations.
          example: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
    Connection:
      required:
      - storeId
      type: object
      properties:
        storeId:
          type: string
          description: The unique identifier of the store in the partner application. This is the ID, along with the Application ID, used to match the correct store when performing operations.
          example: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
    Store:
      required:
      - id
      - name
      - address
      type: object
      properties:
        id:
          type: string
          description: Store identifier.
          example: 9208071e-5f7a-444a-b3a7-4a57ff3f614e
        name:
          type: string
          description: Store name.
          example: Store name 1
        address:
          $ref: '#/components/schemas/Address'
  parameters:
    storeId:
      name: storeId
      in: path
      required: true
      schema:
        type: string
        description: A unique identifier of a store in a UUID format.
        example: 295f76b4-5725-4bf5-a8ab-97943dbdc3b4
    opaquePaginationToken:
      name: token
      in: query
      required: false
      schema:
        type: string
        description: Opaque token used for paging. Query parameters must be URL encoded.
        example: CgwI09+kjQYQwOvF2AM=/(urlencoded:CgwI09%2BkjQYQwOvF2AM%3D)
    brandId:
      name: brandId
      in: path
      required: true
      schema:
        type: string
        description: A unique identifier of a brand in a UUID format.
        example: 295f76b4-5725-4bf5-a8ab-97943dbdc3b4
    limit-2:
      name: limit
      in: query
      required: true
      schema:
        type: string
        description: Max number of stores to retrieve
        example: 5
  responses:
    '422':
      description: The request body is not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    '400':
      description: The request is malformed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    '409':
      description: The connection between the partner application and the store already exists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    '403':
      description: Authorization not valid for the requested resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    '404':
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
    '401':
      description: Invalid authorization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessage'
  securitySchemes:
    OAuth2.0:
      type: oauth2
      description: "The **Authorization API** is based on the [OAuth2.0 protocol](https://tools.ietf.org/html/rfc6749), supporting the (Client Credentials)[https://datatracker.ietf.org/doc/html/rfc6749#section-4.4] and the (Authorization Code)[https://datatracker.ietf.org/doc/html/rfc6749#section-4.1] flows. Resources expect a valid token sent as a `Bearer` token in the HTTP `Authorization` header.\n### Scopes\nScopes must be configured by our internal team to be enabled for an app. Once the scopes are configured they can be enabled on the Application Settings Page in Developer Portal. Each endpoint requires a given scope that can be verified on each endpoint documentation. When generating an OAuth2.0 token multiple scopes can be requested.\n\n### Authorization Code Flow\nTo perform this flow, the authorization code flow must be enabled in the Application Settings Page in Developer Portal. When enabling the flow it is mandatory to provide a redirect URI pointing to your application. Once the flow is complete we will redirect the user to this URI passing the 'code' and 'state' parameters.\nThe Authorization Code flow provides a temporary code that the client application can exchange for an access token. To start the flow the application must request the user authorization. This is done by sending a request to https://{{public-api-url}}/v1/auth/oauth2/authorize.\nExample\n```\ncurl --location 'https://{{public-api-url}}/v1/auth/oauth2/authorize?client_id=[CLIENT_ID]&redirect_uri=[REDIRECT_URI]&response_type=code&scope=organization.read&state=8A9D16B4C3E25F6A'\n```\nThis call will return a 302 redirecting the user to our authorization page. If the user approves the application, we will redirect to configured URI passing the authorization code in the query parameter 'code'. The 'state' parameter is also sent to ensure the source of the data.\nWith the authorization code, the client application can generate the token.\n### Client Credentials Flow\nThe client_credentials flow does not require any steps before generating the token. Once your application is ready, and the client_id and client_secret are available, the token can be generated by following the instructions in the next section.\n\n### Generate Token\nTo generate the token, use the `Client ID` and `Client Secret` (provided during onboarding), and optionally the authorization code obtained after performing the Authorization Code flow, to the [Token Auth endpoint](#operation/requestToken) endpoint. The result of this invocation is a token that is valid for a pre-determined time or until it is manually revoked.\n\nThe access token obtained will be sent as a `Bearer` value of the `Authorization` HTTP header.\n\nClient credentials in the request-body and HTTP Basic Auth are supported.\n\n#### Request Example for client_credentials\n```\ncurl --location --request POST 'https://{{public-api-url}}/v1/auth/token' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'scope=ping' \\\n  --data-urlencode 'grant_type=client_credentials' \\\n  --data-urlencode 'client_id=[APPLICATION_ID]' \\\n  --data-urlencode 'client_secret=[CLIENT_SECRET]'\n\n```\n#### Request Example for authorization_code\n```\ncurl --location --request POST 'https://{{public-api-url}}/v1/auth/token' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'scope=ping' \\\n  --data-urlencode 'grant_type=authorization_code' \\\n  --data-urlencode 'client_id=[APPLICATION_ID]' \\\n  --data-urlencode 'client_secret=[CLIENT_SECRET]' \\\n  --data-urlencode 'code=[code]' \\\n  --data-urlencode 'redirect_uri=[redirect_uri]'\n\n```\n#### Response Example\n```\n{\n  \"access_token\": \"oMahtBwBbnZeh4Q66mSuLFmk2V0_CLCKVt0aYcNJlcg.yditzjwCP7yp0PgR6AzQR3wQ1rTdCjkcPeAMuyfK-NU\",\n  \"expires_in\": 2627999,\n  \"scope\": \"ping orders.create\",\n  \"token_type\": \"bearer\"\n}\n```\n\n### Token Usage\n\nThe token provided in field `access_token` is used to authenticate when consuming the API endpoints. Send the token value in the `Authorization` header of every request. The token expiration time is represented in the field `expired_in`, in seconds. Currently, all tokens are valid for 30 days and should be stored and re-used while still valid.\n\nNote that occasionally, a 401 error may be returned for a valid token due to an internal service issue. Such occurrences should be rare. To prevent exposing potential vulnerabilities to attackers, the Public API does not disclose other types of errors in the authentication flow if for any reason the token can't be validated (when it's a valid token then it's ok to return 5XX or other 4XX though - such as 403). In such scenarios, although the internal auth flow avoids retries to prevent attacks, if the token is known to be valid and not expired, a retry with a backoff interval by the client is advised. Another option is to request a new token.\n\n#### Example\n\n```\ncurl --location --request GET 'https://{{public-api-url}}/v1/ping' \\\n  --header 'Authorization: Bearer <access_token>' \\\n  --header 'X-Store-Id: <storeId>'\n\n```\n"
      flows:
        clientCredentials:
          tokenUrl: /v1/auth/token
          scopes:
            catalog: Permission to interact with product inventory for existing stores.
            delivery.provider: Permission to provide delivery services for existing orders.
            finance: Permission to provide financial data for orders/stores.
            manager.menus: Permission to manag

# --- truncated at 32 KB (80 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/openapi/otter-organization-endpoints-api-openapi.yml