Skip to content

Cart

This section documents all API endpoints related to managing shopping carts. Here you will find details on how to create, update, delete, search, and retrieve carts, as well as how to manage the products associated with each cart.

Get Single

Request Method: GET

URL Endpoint: /merchant/{ merchantid }/cart/{ cartid }

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "d0doh5fsvrvasm390u6g",
    "merchant_id": "testmerchant12345678",
    "card_processor_id": "",
    "ach_processor_id": "",
    "name": "initiatives",
    "description": "sample cart description",
    "type": "normal",
    "custom_fields_group": "default",
    "products": [
      {
        "id": "d0doh5fsvrvasm390u30",
        "public_hash": "fe254495-bca4-4d2b-9960-da166ae5f36f",
        "merchant_id": "testmerchant12345678",
        "sku": "dbb3fd7a-31f0-4431-8a55-1a1935844c64",
        "name": "bleeding-edge",
        "img": "https://picsum.photos/250/159",
        "price": 233,
        "local_tax": 225,
        "national_tax": 210,
        "fixed_amount": true,
        "fixed_qty": false,
        "unit_of_measure": null,
        "description": "sample product description",
        "created_at": "2025-05-07T16:21:42Z",
        "updated_at": "2025-05-07T16:21:42Z",
        "deleted_at": null
      },
      ...
    ],
    "show_available_products": true,
    "require_shipping_details": false,
    "email_receipt": false,
    "payments": ["card", "ach"],
    "success_url": "http://www.futureb2b.info/streamline/rich",
    "cancel_url": "http://www.districtcollaborative.net/expedite",
    "settings": {
      "product_subtitle_verbiage": "Products",
      "save_customer_vault": "none"
    },
    "created_at": "2025-05-07T16:21:42Z",
    "updated_at": "2025-05-07T16:21:42Z",
    "deleted_at": null
  }
}

Request Method: POST

URL Endpoint: /merchant/{ merchantid }/cart/search

QuerySearchString: Operator can be =, !=

QuerySearchInt: Operator can be =, !=, <, >

json
Example Body
{
  "{name}": {
    "operator": "=", // =, !=, <, >
    "value": "{value}"
  }
}
NameTypeDescription
idQuerySearchStringSearches for id
nameQuerySearchStringSearches for name
productQuerySearchStringSearches for product name
created_atQueryDateRangeSearches for created_at
updated_atQueryDateRangeSearches for updated_at
deleted_atQueryDateRangeSearches for deleted_at
limitintegerMaximum records to return (0-100)
offsetintegerNumber of records to offset the return by

Get All

Request Method: GET

URL Endpoint: /merchant/{ merchantid }/cart

json
{
  "status": "success",
  "msg": "success",
  "data": [
    {
      "id": "d0doh5fsvrvasm390u6g",
      "public_hash": "2c2b1b32-c00e-4caa-9931-a21d1e4a8cc1",
      "merchant_id": "testmerchant12345678",
      "card_processor_id": null,
      "ach_processor_id": null,
      "name": "initiatives",
      "description": "sample description",
      "type": "normal",
      "custom_fields_group": "default",
      "payments": ["card", "ach"],
      "products": [
        "d0doh5fsvrvasm390u30",
        "d0doh5fsvrvasm390u3g",
        "d0doh5fsvrvasm390u40",
        "d0doh5fsvrvasm390u4g",
        "d0doh5fsvrvasm390u50",
        "d0doh5fsvrvasm390u5g",
        "d0doh5fsvrvasm390u60"
      ],
      "show_available_products": true,
      "require_shipping_details": false,
      "email_receipt": false,
      "success_url": "",
      "cancel_url": "",
      "settings": null,
      "created_at": "2025-05-07T16:21:42Z",
      "updated_at": "2025-05-07T16:21:42Z",
      "deleted_at": null
    },
    ...
  ]
}

Create

Request Method: POST

URL Endpoint: /merchant/{ merchantid }/cart

NameTypeDescriptionRequired
typestringnormal or donationtrue
namestringbetween 1 and 100 characterstrue
descriptionstringcart descriptionfalse
custom_fields_groupstringmust be less than 255 charactersfalse
card_processor_idstring^[0-9a-v]{20}$false
ach_processor_idstring^[0-9a-v]{20}$false
success_urlstringmust be valid URLfalse
cancel_urlstringmust be valid URLfalse
show_available_productsboolfalse
require_shipping_detailsboolfalse
email_receiptboolfalse

Update

Request Method: POST

URL Endpoint: /merchant/{ merchantid }/cart/{ cartid }

json
{
  "name": "initiatives",
  "description": "sample description",
  "type": "normal",
  "custom_fields_group": "default",
  "payments": ["card", "ach"],
  "products": ["product1", "product2", "product3", "product4"],
  "show_available_products": false,
  "require_shipping_details": false,
  "email_receipt": false,
  "success_url": "",
  "cancel_url": "",
  "settings": null
}

Delete

Request Method: DELETE

URL Endpoint: /merchant/{ merchantid }/cart/{ cartid }

json
{
  "status": "success",
  "msg": "success",
  "data": "Deleted cart"
}

Products

This section covers API endpoints for managing products. You will find information on how to create, update, delete, search, and retrieve individual or multiple products that can be added to carts.

Get Single

Request Method: GET

URL Endpoint: /api/merchant/{ merchantid }/product/{ productid }

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "d0ecs87svrvfjfvijd70",
    "public_hash": "f164740d-1005-4f9a-b958-111e4704840f",
    "merchant_id": "testmerchant12345678",
    "sku": "acdfd73e-9fae-45ab-8c5e-c6a6920aff30",
    "name": "applications",
    "img": "https://picsum.photos/244/223",
    "price": 708,
    "local_tax": 388,
    "national_tax": 444,
    "fixed_amount": true,
    "fixed_qty": false,
    "unit_of_measure": null,
    "description": "Train his child does camp terribly myself pride us yet. Moonlight handle publicity shall keep those watch drag truthfully anyone. Bravo tasty these to has rarely soon capture as quarterly.",
    "created_at": "2025-05-08T15:30:41Z",
    "updated_at": "2025-05-08T15:30:41Z",
    "deleted_at": null
  }
}

Request Method: POST

URL Endpoint: /api/merchant/{ merchantid }/product/search

QuerySearchString: Operator can be =, !=

QuerySearchInt: Operator can be =, !=, <, >

json
Example Body
{
  "{name}": {
    "operator": "=", // =, !=, <, >
    "value": "{value}"
  }
}
NameTypeDescription
idQuerySearchStringSearches for id
nameQuerySearchStringSearches for name
priceQuerySearchIntSearches by price
created_atQueryDateRangeSearches for created_at
updated_atQueryDateRangeSearches for updated_at
deleted_atQueryDateRangeSearches for deleted_at
limitintegerMaximum records to return (0-100)
offsetintegerNumber of records to offset the return by

Get All

Request Method: GET

URL Endpoint: /api/merchant/{ merchantid }/product

== Sample Response Body

json
{
    "status": "success",
    "msg": "success",
    "data": [
        {
            "id": "d0ecs87svrvfjfvijd70",
            "public_hash": "f164740d-1005-4f9a-b958-111e4704840f",
            "merchant_id": "testmerchant12345678",
            "sku": "acdfd73e-9fae-45ab-8c5e-c6a6920aff30",
            "name": "applications",
            "img": "https://picsum.photos/244/223",
            "price": 708,
            "local_tax": 388,
            "national_tax": 444,
            "fixed_amount": true,
            "fixed_qty": false,
            "unit_of_measure": null,
            "description": "sample description",
            "created_at": "2025-05-08T15:30:41Z",
            "updated_at": "2025-05-08T15:30:41Z",
            "deleted_at": null
        },
        ...
    ]
}

== Code

:::

Create

Request Method: POST

URL Endpoint: /api/merchant/{merchantid}/product

NameTypeDefaultDescriptionRequiredRegex
skustringProduct Skutrue([0-9a-z]{0-20})
namestringdisplay nametrue([0-9a-z -]{0-100})
imgstringproduct image (base64 encoded)false
priceunsigned intunit pricetrue([0-9a-z -]{0-100})
fixed_amountbooleanshould we lock the amount or allow the end user to customize the amounttrue
fixed_qtybooleanshould we lock the quantity or allow the end user to customize the quantitytrue
descriptionstringitem descriptiontrue254 characters

Update

Request Method: POST

URL Endpoint: /api/merchant/{ merchantid }/product/{ productid }

json
{
  "sku": "PRODUCTSKU",
  "name": "TESTPRODUCT",
  "img": "",
  "price": 100,
  "fixed_amount": false,
  "fixed_qty": false,
  "description": "DESCRIPTION GOES HERE"
}

Delete

Request Method: DELETE

URL Endpoint: /api/merchant/{ merchantid }/product/{ productid }

json
{
  "status": "success",
  "msg": "success",
  "data": "Deleted product"
}