Loop Returns Cart API

The Cart API from Loop Returns — 2 operation(s) for cart.

Operations 4

POST /cart Create Cart #
GET /cart/{token} Get Cart #
POST /cart/{token} Update Cart #
DELETE /cart/{token} Delete Cart #

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/loop-returns-cart-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

loop-returns-cart-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Loop Returns Cart API
  description: API for managing shop carts in Shop Now On-Store exchanges.
  version: v1
servers:
- url: https://api.loopreturns.com/api/v1
tags:
- name: Cart
paths:
  /cart:
    post:
      summary: Create Cart
      operationId: createCart
      description: Create a cart object and populate it with one or more product variants.
      tags:
      - Cart
      security:
      - api_key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCartRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/CreatedCart'
                - $ref: '#/components/schemas/EmptyCart'
                - $ref: '#/components/schemas/VariantNotFound'
                - $ref: '#/components/schemas/CartNotSaved'
                - $ref: '#/components/schemas/InvalidCart'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
  /cart/{token}:
    get:
      summary: Get Cart
      operationId: getCart
      description: Get an existing cart by cart token.
      tags:
      - Cart
      security:
      - api_key: []
      parameters:
      - in: path
        name: token
        schema:
          type: string
        required: true
        description: The unique identifier token associated with a cart.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    post:
      summary: Update Cart
      operationId: updateCart
      description: Modify an existing cart. The array of product variants will overwrite the cart's existing contents.
      tags:
      - Cart
      security:
      - api_key: []
      parameters:
      - in: path
        name: token
        schema:
          type: string
        required: true
        description: The unique identifier token associated with a cart.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCartRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/UpdatedCart'
                - $ref: '#/components/schemas/CartNotUpdated'
                - $ref: '#/components/schemas/EmptyCart'
                - $ref: '#/components/schemas/VariantNotFound'
                - $ref: '#/components/schemas/InvalidCart'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
    delete:
      tags:
      - Cart
      summary: Delete Cart
      operationId: deleteCart
      security:
      - api_key: []
      description: Delete an existing cart in Shop Now On-Store.
      parameters:
      - in: path
        name: token
        schema:
          type: string
        required: true
        description: The unique identifier token associated with a cart.
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/CartNotFound'
                - $ref: '#/components/schemas/CartNotDeleted'
                - $ref: '#/components/schemas/DeletedCart'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
components:
  schemas:
    CartNotUpdated:
      type: object
      properties:
        errors:
          type: object
          properties:
            message:
              type: string
              example: Error saving cart update.
    DeletedCart:
      type: boolean
      example: true
    UpdateCartRequest:
      type: object
      required:
      - cart
      properties:
        cart:
          type: array
          description: An array of product variant identifiers.
          items:
            $ref: '#/components/schemas/Variant'
    InvalidCart:
      type: object
      properties:
        errors:
          type: object
          properties:
            message:
              type: string
              example: Cart should contain a list of variant IDs.
    CartNotFound:
      type: object
      properties:
        errors:
          type: object
          properties:
            message:
              type: string
              example: No cart found for the provided token.
    CreateCartRequest:
      type: object
      required:
      - cart
      properties:
        cart:
          type: array
          items:
            $ref: '#/components/schemas/Variant'
          description: An array of product variants.
        shopify:
          description: A Base64-encoded liquid cart object, used to reflect additional transaction details in Shopify such as discounts.
          type: string
          example: c2FtcGxlLXN0cmluZw==
    VariantNotFound:
      type: object
      properties:
        errors:
          type: object
          properties:
            message:
              type: string
              example: Variant ID 777777 not found.
        data:
          type: object
          properties:
            cart:
              type: array
              items:
                $ref: '#/components/schemas/Variant'
    Variant:
      type: number
      example: 39076568408247
      description: The unique identifier associated with a product variant.
    CartNotDeleted:
      type: object
      properties:
        errors:
          type: object
          properties:
            message:
              type: string
              example: Failed to delete cart.
    UnauthorizedResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: '401'
            http_code:
              type: string
              example: GEN-UNAUTHORIZED
            message:
              type: string
              example: Unauthorized.
    EmptyCart:
      type: object
      properties:
        errors:
          type: object
          properties:
            message:
              type: string
              example: Cart is empty.
        data:
          type: object
          properties:
            cart:
              type: array
              items:
                $ref: '#/components/schemas/Variant'
    CartNotSaved:
      type: object
      properties:
        errors:
          type: object
          properties:
            message:
              type: string
              example: There was an error attempting to create the cart.
    Cart:
      type: object
      properties:
        cart:
          type: array
          items:
            type: integer
            example: 39076568408247
    CreatedCart:
      type: object
      properties:
        token:
          type: string
          example: 46923497728c9a7b5o8a433zz5c0bbbb683319824778
          description: The cart's unique identifier.
        data:
          type: object
          properties:
            cart:
              type: array
              items:
                $ref: '#/components/schemas/Variant'
    UpdatedCart:
      type: object
      properties:
        updated:
          type: boolean
          example: true
        data:
          type: object
          properties:
            cart:
              type: array
              items:
                $ref: '#/components/schemas/Variant'
  securitySchemes:
    api_key:
      type: apiKey
      name: X-Authorization
      in: header