Catalog API Documentation

Browse endpoints, parameters, and live request examples.

POST /sockets/{socket_id}/cart/{external_user_id}/unlock

Unlock the cart

Unlocks a previously locked cart, allowing modifications again. This is useful when order placement fails or is cancelled and the cart needs to be edited.

The cart version will be updated after unlocking.

Cart

Parameters

socket_id required path (integer)

Socket identifier

external_user_id required path (string)

External user identifier

Responses

200 Cart unlocked successfully
Cart successfully unlocked
{
  "cart": {
    "address_1": "123 Main Street",
    "address_2": "Apt 4B",
    "address_3": null,
    "address_4": null,
    "cart_version": "550e8400-e29b-41d4-a716-446655440055",
    "city": "New York",
    "country": "US",
    "currency": "USD",
    "email": "john.doe@example.com",
    "given_name": "John",
    "is_locked": false,
    "line_items": [
      {
        "product_options": {
          "12345": [
            {
              "order": "1",
              "slug": "color",
              "translations": [
                {
                  "language": "en-US",
                  "option_name": "Color",
                  "value_name": "Black"
                }
              ],
              "value": "black"
            }
          ]
        },
        "points": 2500,
        "is_explicit": false,
        "category_ids": [
          2716,
          2714
        ],
        "retail_price": "349.99",
        "item_type_id": 100,
        "availability": "IN_STOCK",
        "tag_ids": [],
        "sku": "WH-PREMIUM-001",
        "is_stock_reserved": false,
        "stock_reserved_until": null,
        "description": "High-quality wireless headphones with noise cancellation",
        "name": "Premium Wireless Headphones",
        "brand_id": 123,
        "is_taxable": true,
        "catalog_item_variant_id": null,
        "external_product_id": "3ddd1114-1114-1114-1114-111411141114",
        "price": "249.99",
        "tags": [
          "electronics",
          "audio"
        ],
        "model": "WH-PREMIUM-001",
        "images": [
          {
            "alt": "Premium Wireless Headphones - Front View",
            "is_primary": true,
            "order": 1,
            "urls": {
              "image_150_1_1": "https://cdn.example.com/img/150/headphones-front.jpg",
              "image_150_3_2": "https://cdn.example.com/img/150c/headphones-front.jpg",
              "image_300_1_1": "https://cdn.example.com/img/300/headphones-front.jpg",
              "image_300_3_2": "https://cdn.example.com/img/300c/headphones-front.jpg",
              "image_500_1_1": "https://cdn.example.com/img/500/headphones-front.jpg",
              "image_500_3_2": "https://cdn.example.com/img/500c/headphones-front.jpg",
              "image_75_1_1": "https://cdn.example.com/img/75/headphones-front.jpg",
              "image_75_3_2": "https://cdn.example.com/img/75c/headphones-front.jpg"
            }
          }
        ],
        "errors": [],
        "available": true,
        "shipping_estimate": "11.99",
        "rank": 295,
        "original_points": 3000,
        "brand": "AudioTech",
        "fulfillment_type": "SHIP",
        "is_primary": false,
        "options": [],
        "product_id": "3ddd1114-1114-1114-1114-111411141114",
        "catalog_item_id": 12345,
        "supplier_reference_id": "AT-WH-001",
        "is_available": true,
        "metadata": {
          "gift_message": "Happy Birthday!",
          "gift_wrap": "true"
        },
        "required_fields": {
          "address_1": true,
          "city": true,
          "country": true,
          "email": true,
          "given_name": true,
          "postal_code": true,
          "state_or_region": true,
          "surname": true
        },
        "supplier_id": 1001,
        "line_item_id": "22687a62-27f9-4b60-9a8c-af394729d423",
        "is_limited_stock": false,
        "original_price": "299.99"
      }
    ],
    "metadata": {
      "last_validation": "2023-12-01T15:29:00.000Z",
      "order_attempt": "1"
    },
    "phone_number": "555-123-4567",
    "postal_code": "10001",
    "state_or_region": "NY",
    "surname": "Doe",
    "total": "272.49",
    "total_line_items": 1,
    "unique_item_count": 1
  },
  "errors": [],
  "success": true,
  "timestamp": "2023-12-01T15:30:45.123Z"
}
Empty cart unlocked
{
  "cart": {
    "address_1": null,
    "address_2": null,
    "address_3": null,
    "address_4": null,
    "cart_version": "550e8400-e29b-41d4-a716-446655440056",
    "city": null,
    "country": null,
    "currency": "USD",
    "email": null,
    "given_name": null,
    "is_locked": false,
    "line_items": [],
    "metadata": {},
    "phone_number": null,
    "postal_code": null,
    "state_or_region": null,
    "surname": null,
    "total": "0.00",
    "total_line_items": 0,
    "unique_item_count": 0
  },
  "errors": [],
  "success": true,
  "timestamp": "2023-12-01T15:30:45.123Z"
}
Response Schema
Schema Reference:

Response containing the current state of a user's cart

Type: object
Required fields:
success timestamp cart

Properties:

cart ref: Cart required
errors
matched_entities
success required
timestamp required
400 Cart is not locked
Cart is not locked
{
  "error_code": "CART_NOT_LOCKED",
  "message": "Cart is not locked",
  "success": false,
  "timestamp": "2023-12-01T15:30:45.123Z"
}
Response Schema
Schema Reference:

Standard error response format

Type: object
Required fields:
success message timestamp error_code

Properties:

error_code required
message required
success required
timestamp required
404 Socket or cart not found
Cart not found
{
  "error_code": "NOT_FOUND",
  "message": "Cart not found",
  "success": false,
  "timestamp": "2023-12-01T15:30:45.123Z"
}
Socket not found
{
  "error_code": "NOT_FOUND",
  "message": "Socket not found",
  "success": false,
  "timestamp": "2023-12-01T15:30:45.123Z"
}
Response Schema
Schema Reference:

Error response when requested resource is not found

Type: object
Required fields:
success message timestamp error_code

Properties:

error_code required
message required
success required
timestamp required