Synchronity Cart API

Cart session management

GitHub OpenAPI

Operations 8

POST /v1/sites/{site_id}/cart Create a new cart session #
GET /v1/sites/{site_id}/cart/{cart_id} Get current cart state #
POST /v1/sites/{site_id}/cart/{cart_id}/items Add an item to a cart #
PUT /v1/sites/{site_id}/cart/{cart_id}/items/{item_id} Set a cart line's quantity #
DELETE /v1/sites/{site_id}/cart/{cart_id}/items/{item_id} Remove an item from a cart #
POST /v1/sites/{site_id}/cart/{cart_id}/coupon Apply a coupon code to a cart #
PUT /v1/sites/{site_id}/cart/{cart_id}/shipping-address Set shipping address #
POST /v1/sites/{site_id}/cart/{cart_id}/shipping-option Select shipping option #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/synchronity-app:synchronity-app-cart-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

synchronity-app-cart-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Synchronity Cart API
  version: 0.1.0
  description: 'The Synchronity Gateway API is the central HTTP interface that AI agents call to

    discover connected stores, search products, manage carts, and execute checkout

    across any Synchronity-registered e-commerce platform.


    COVERAGE: these operations read only from stores a user has connected to their

    Synchronity account, live from each merchant. Product data, prices, stock, and

    orders are specific to those connected stores and are not derived from public web

    listings. listSites returns the connected stores with their IDs and matches partial

    or approximate store names; every other operation takes a site_id. Checkout and

    payment complete only with the buyer''s explicit one-time-code approval.


    All endpoints require a valid Agent Identity Token (AIT) — a signed RS256 JWT —

    passed as a Bearer token. Scopes within the AIT control which operations are permitted.


    See the Synchronity Protocol Specification (APS) for full authentication and schema details.'
  contact:
    name: Synchronity Team
    url: https://synchronity.app
  license:
    name: Proprietary
servers:
- url: https://api.synchronity.app
  description: Synchronity Gateway
security:
- BearerAIT: []
tags:
- name: Cart
  description: Cart session management
paths:
  /v1/sites/{site_id}/cart:
    post:
      operationId: createCart
      tags:
      - Cart
      summary: Create a new cart session
      description: Creates a new cart session on the specified site.
      x-agentmesh-scope: manage_cart
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCartRequest'
      responses:
        '201':
          description: Cart created.
          headers:
            X-AgentMesh-Request-Id:
              $ref: '#/components/headers/X-AgentMesh-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AMPSCart'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      x-openai-isConsequential: false
  /v1/sites/{site_id}/cart/{cart_id}:
    get:
      operationId: getCart
      tags:
      - Cart
      summary: Get current cart state
      description: Returns the current state of the specified cart.
      x-agentmesh-scope: manage_cart
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: cart_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Cart state.
          headers:
            X-AgentMesh-Request-Id:
              $ref: '#/components/headers/X-AgentMesh-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AMPSCart'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '410':
          description: Cart session has expired.
          headers:
            X-AgentMesh-Request-Id:
              $ref: '#/components/headers/X-AgentMesh-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AMPSError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      x-openai-isConsequential: false
  /v1/sites/{site_id}/cart/{cart_id}/items:
    post:
      operationId: addCartItem
      tags:
      - Cart
      summary: Add an item to a cart
      description: Adds a product (with optional variant) to the specified cart.
      x-agentmesh-scope: manage_cart
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: cart_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddCartItemRequest'
      responses:
        '200':
          description: Updated cart state.
          headers:
            X-AgentMesh-Request-Id:
              $ref: '#/components/headers/X-AgentMesh-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AMPSCart'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '410':
          description: Cart session has expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AMPSError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      x-openai-isConsequential: false
  /v1/sites/{site_id}/cart/{cart_id}/items/{item_id}:
    put:
      operationId: setCartItemQuantity
      tags:
      - Cart
      summary: Set a cart line's quantity
      description: Sets the absolute quantity of a cart line item. The server cart is the checkout source of truth, so this updates it directly. A quantity of 0 removes the line. Returns the updated cart.
      x-agentmesh-scope: manage_cart
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: cart_id
        in: path
        required: true
        schema:
          type: string
      - name: item_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - quantity
              properties:
                quantity:
                  type: integer
                  minimum: 0
                  description: New absolute quantity for the line item (0 removes it).
      responses:
        '200':
          description: Updated cart state after the quantity change.
          headers:
            X-AgentMesh-Request-Id:
              $ref: '#/components/headers/X-AgentMesh-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AMPSCart'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      x-openai-isConsequential: false
    delete:
      operationId: removeCartItem
      tags:
      - Cart
      summary: Remove an item from a cart
      description: Removes the specified line item from the cart.
      x-agentmesh-scope: manage_cart
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: cart_id
        in: path
        required: true
        schema:
          type: string
      - name: item_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Updated cart state after removal.
          headers:
            X-AgentMesh-Request-Id:
              $ref: '#/components/headers/X-AgentMesh-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AMPSCart'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      x-openai-isConsequential: false
  /v1/sites/{site_id}/cart/{cart_id}/coupon:
    post:
      operationId: applyCoupon
      tags:
      - Cart
      summary: Apply a coupon code to a cart
      description: Applies a coupon or discount code to the specified cart.
      x-agentmesh-scope: manage_cart
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: cart_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyCouponRequest'
      responses:
        '200':
          description: Updated cart with applied discount.
          headers:
            X-AgentMesh-Request-Id:
              $ref: '#/components/headers/X-AgentMesh-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AMPSCart'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      x-openai-isConsequential: false
  /v1/sites/{site_id}/cart/{cart_id}/shipping-address:
    put:
      operationId: setCartShippingAddress
      tags:
      - Cart
      summary: Set shipping address
      description: Set the cart's shipping destination to fetch available shipping rates.
      x-agentmesh-scope: manage_cart
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: cart_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetShippingAddressRequest'
      responses:
        '200':
          description: Shipping address set and available rates returned.
          headers:
            X-AgentMesh-Request-Id:
              $ref: '#/components/headers/X-AgentMesh-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AMPSCart'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      x-openai-isConsequential: false
  /v1/sites/{site_id}/cart/{cart_id}/shipping-option:
    post:
      operationId: selectCartShippingOption
      tags:
      - Cart
      summary: Select shipping option
      description: Select a shipping option and bind it to the cart.
      x-agentmesh-scope: manage_cart
      parameters:
      - name: site_id
        in: path
        required: true
        schema:
          type: string
      - name: cart_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SelectShippingOptionRequest'
      responses:
        '200':
          description: Shipping option selected.
          headers:
            X-AgentMesh-Request-Id:
              $ref: '#/components/headers/X-AgentMesh-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AMPSCart'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      x-openai-isConsequential: false
components:
  responses:
    RateLimited:
      description: Rate limit exceeded.
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-AgentMesh-Request-Id:
          $ref: '#/components/headers/X-AgentMesh-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AMPSError'
          example:
            error:
              code: RATE_LIMIT_EXCEEDED
              message: Rate limit exceeded. Retry after 47 seconds.
    BadRequest:
      description: Malformed request or validation error.
      headers:
        X-AgentMesh-Request-Id:
          $ref: '#/components/headers/X-AgentMesh-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AMPSError'
    Unauthorized:
      description: Missing or invalid Agent Identity Token.
      headers:
        X-AgentMesh-Request-Id:
          $ref: '#/components/headers/X-AgentMesh-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AMPSError'
          example:
            error:
              code: UNAUTHORIZED
              message: Missing or invalid Agent Identity Token.
    InternalError:
      description: Unexpected server error.
      headers:
        X-AgentMesh-Request-Id:
          $ref: '#/components/headers/X-AgentMesh-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AMPSError'
    Forbidden:
      description: AIT lacks the required scope for this operation.
      headers:
        X-AgentMesh-Request-Id:
          $ref: '#/components/headers/X-AgentMesh-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AMPSError'
          example:
            error:
              code: INSUFFICIENT_SCOPE
              message: This operation requires the execute_checkout scope.
    NotFound:
      description: The requested resource does not exist.
      headers:
        X-AgentMesh-Request-Id:
          $ref: '#/components/headers/X-AgentMesh-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AMPSError'
  headers:
    X-RateLimit-Remaining:
      description: Requests remaining in current window.
      schema:
        type: integer
        example: 42
    X-RateLimit-Limit:
      description: Maximum requests per minute for this agent.
      schema:
        type: integer
        example: 60
    X-AgentMesh-Request-Id:
      description: Unique request identifier for audit trail correlation.
      schema:
        type: string
        example: req_01HZABCDEFGHIJKLMNOP
    X-RateLimit-Reset:
      description: Unix epoch timestamp when the rate limit window resets.
      schema:
        type: integer
        example: 1746100800
    Retry-After:
      description: Seconds to wait before retrying after a 429 response.
      schema:
        type: integer
        example: 47
  schemas:
    SelectShippingOptionRequest:
      type: object
      required:
      - option_id
      properties:
        option_id:
          type: string
          description: Selected shipping option identifier.
    AMPSCart:
      type: object
      required:
      - cart_id
      - site_id
      - items
      - subtotal
      - total
      - currency
      - expires_at
      properties:
        cart_id:
          type: string
        site_id:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/AMPSCartItem'
        subtotal:
          $ref: '#/components/schemas/MonetaryAmount'
        discounts:
          type: array
          items:
            $ref: '#/components/schemas/AMPSDiscount'
        total:
          $ref: '#/components/schemas/MonetaryAmount'
        currency:
          type: string
          pattern: ^[A-Z]{3}$
        expires_at:
          type: string
          format: date-time
        checkout_mode:
          type: string
          enum:
          - redirect
          description: 'Present when the store hosts checkout (e.g. Shopify): the client shows a ''Continue to checkout'' handoff to checkout_url instead of a cart-stage shipping/payment flow.'
        checkout_url:
          type: string
          format: uri
          description: Hosted-checkout URL for redirect-mode stores.
    ApplyCouponRequest:
      type: object
      required:
      - code
      properties:
        code:
          type: string
    CreateCartRequest:
      type: object
      properties:
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          default: USD
    SetShippingAddressRequest:
      type: object
      required:
      - country_code
      properties:
        country_code:
          type: string
          pattern: ^[A-Za-z]{2}$
          description: 2-letter ISO country code.
        postal_code:
          type: string
        state:
          type: string
        city:
          type: string
    MonetaryAmount:
      type: object
      required:
      - amount
      - currency
      properties:
        amount:
          type: string
          pattern: ^\d+\.\d{2}$
          description: Decimal string with exactly 2 decimal places.
          example: '19.99'
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          description: ISO 4217 currency code.
          example: USD
    AddCartItemRequest:
      type: object
      required:
      - product_id
      - quantity
      properties:
        product_id:
          type: string
        variant_id:
          type: string
        quantity:
          type: integer
          minimum: 1
        addons:
          type: object
          additionalProperties: true
          description: Selected ACF product add-ons as key-value pairs (addon_id -> selected_value).
    AMPSDiscount:
      type: object
      required:
      - code
      - amount
      properties:
        code:
          type: string
        description:
          type: string
        amount:
          $ref: '#/components/schemas/MonetaryAmount'
    AMPSError:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
              example: The requested resource could not be found.
            details:
              type: object
              additionalProperties: true
    AMPSCartItem:
      type: object
      required:
      - item_id
      - product_id
      - title
      - quantity
      - unit_price
      - line_total
      properties:
        item_id:
          type: string
        product_id:
          type: string
        variant_id:
          type: string
        title:
          type: string
        quantity:
          type: integer
          minimum: 1
        unit_price:
          $ref: '#/components/schemas/MonetaryAmount'
        line_total:
          $ref: '#/components/schemas/MonetaryAmount'
        image_url:
          type: string
          format: uri
          nullable: true
          description: Product image for the cart line.
  securitySchemes:
    BearerAIT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'RS256-signed Agent Identity Token (AIT). Obtain via POST /v1/auth/agents/register.

        Transmit as: `Authorization: Bearer <AIT>`

        '