StoreLyne API docs 2026-11

Customers, newest first

GET/admin/2026-11/customers

scope read_customers

Query parameters

  • limitinteger

    Items per page, 1 to 250.

    Default 50 · 1 to 250

  • afterstring

    Cursor from a previous next_cursor.

    Up to 512 characters

  • qstring

    Name, email or phone.

    At least 1 characters · Up to 100 characters

Response 200

  • dataarray of objectrequired
  • data[].idID (cus_...)required
  • data[].namestringrequired
  • data[].emailstring or nullrequired
  • data[].phonestring or nullrequired
  • data[].accepts_emailbooleanrequired
  • data[].accepts_whatsappbooleanrequired
  • data[].orders_countintegerrequired
  • data[].total_spentintegerrequired
  • data[].notestringrequired
  • data[].addressesarray of objectrequired
  • data[].addresses[].idID (adr_...)required
  • data[].addresses[].namestringrequired
  • data[].addresses[].line1stringrequired
  • data[].addresses[].line2stringrequired
  • data[].addresses[].citystringrequired
  • data[].addresses[].statestringrequired
  • data[].addresses[].pincodestringrequired
  • data[].addresses[].countrystringrequired
  • data[].addresses[].phonestring or nullrequired
  • data[].addresses[].is_defaultbooleanrequired
  • data[].created_attimestamprequired
  • data[].updated_attimestamprequired
  • has_morebooleanrequired
  • next_cursorstring or nullrequired

Errors

400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
403missing_scopeThe app token does not have the scope this endpoint needs.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl https://api.storelyne.com/admin/2026-11/customers \
  -H "Authorization: Bearer pat_live_..."
Response 200
{
  "data": [
    {
      "id": "cus_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
      "name": "Festive saree",
      "email": "buyer@example.com",
      "phone": "+919876543210",
      "accepts_email": false,
      "accepts_whatsapp": false,
      "orders_count": 1,
      "total_spent": 49900,
      "note": "Hand block printed cotton.",
      "addresses": [
        {
          "id": "adr_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
          "name": "Festive saree",
          "line1": "string",
          "line2": "string",
          "city": "string",
          "state": "string",
          "pincode": "string",
          "country": "IN",
          "phone": "+919876543210",
          "is_default": false
        }
      ],
      "created_at": "2026-11-04T10:00:00.000Z",
      "updated_at": "2026-11-04T10:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": "eyJpZCI6Ii4uLiJ9"
}

Add a customer (merged into an existing one with the same phone, then email)

POST/admin/2026-11/customers

scope write_customersIdempotency-Key required

Headers

  • Idempotency-Keystringrequired

    Unique key for this request. Retries with the same key return the first response.

    At least 1 characters · Up to 255 characters

  • X-CSRF-Tokenstring

    Required with a seller session cookie: the value of the orb_csrf cookie.

Request body

  • namestring

    Up to 120 characters

  • emailstring or null

    Default null

  • phonestring or null
  • notestring

    Up to 2000 characters

  • addressobject
  • address.namestringrequired

    At least 1 characters · Up to 120 characters

  • address.line1stringrequired

    At least 1 characters · Up to 200 characters

  • address.line2string

    Up to 200 characters

  • address.citystringrequired

    At least 1 characters · Up to 100 characters

  • address.statestringrequired

    At least 1 characters · Up to 100 characters

  • address.pincodestringrequired
  • address.country"IN"

    Default "IN"

  • address.phonestring or null
  • address.is_defaultboolean

    Default false

Response 201

  • idID (cus_...)required
  • namestringrequired
  • emailstring or nullrequired
  • phonestring or nullrequired
  • accepts_emailbooleanrequired
  • accepts_whatsappbooleanrequired
  • orders_countintegerrequired
  • total_spentintegerrequired
  • notestringrequired
  • addressesarray of objectrequired
  • addresses[].idID (adr_...)required
  • addresses[].namestringrequired
  • addresses[].line1stringrequired
  • addresses[].line2stringrequired
  • addresses[].citystringrequired
  • addresses[].statestringrequired
  • addresses[].pincodestringrequired
  • addresses[].countrystringrequired
  • addresses[].phonestring or nullrequired
  • addresses[].is_defaultbooleanrequired
  • created_attimestamprequired
  • updated_attimestamprequired

Errors

400idempotency_key_requiredEvery POST needs an Idempotency-Key header.
400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
403missing_scopeThe app token does not have the scope this endpoint needs.
409idempotency_in_progressA request with this Idempotency-Key is still running.
422idempotency_key_reusedThis Idempotency-Key was used with a different request.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl -X POST https://api.storelyne.com/admin/2026-11/customers \
  -H "Authorization: Bearer pat_live_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "",
  "email": "buyer@example.com",
  "phone": "+919876543210"
}'
Response 201
{
  "id": "cus_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "name": "Festive saree",
  "email": "buyer@example.com",
  "phone": "+919876543210",
  "accepts_email": false,
  "accepts_whatsapp": false,
  "orders_count": 1,
  "total_spent": 49900,
  "note": "Hand block printed cotton.",
  "addresses": [
    {
      "id": "adr_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
      "name": "Festive saree",
      "line1": "string",
      "line2": "string",
      "city": "string",
      "state": "string",
      "pincode": "string",
      "country": "IN",
      "phone": "+919876543210",
      "is_default": false
    }
  ],
  "created_at": "2026-11-04T10:00:00.000Z",
  "updated_at": "2026-11-04T10:00:00.000Z"
}

One customer with addresses

GET/admin/2026-11/customers/{id}

scope read_customers

Path parameters

  • idID (cus_...)required

Response 200

  • idID (cus_...)required
  • namestringrequired
  • emailstring or nullrequired
  • phonestring or nullrequired
  • accepts_emailbooleanrequired
  • accepts_whatsappbooleanrequired
  • orders_countintegerrequired
  • total_spentintegerrequired
  • notestringrequired
  • addressesarray of objectrequired
  • addresses[].idID (adr_...)required
  • addresses[].namestringrequired
  • addresses[].line1stringrequired
  • addresses[].line2stringrequired
  • addresses[].citystringrequired
  • addresses[].statestringrequired
  • addresses[].pincodestringrequired
  • addresses[].countrystringrequired
  • addresses[].phonestring or nullrequired
  • addresses[].is_defaultbooleanrequired
  • created_attimestamprequired
  • updated_attimestamprequired

Errors

400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
403missing_scopeThe app token does not have the scope this endpoint needs.
404resource_not_foundThe object does not exist or belongs to another store.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl https://api.storelyne.com/admin/2026-11/customers/cus_01JCG8ZQ5S7T0V4X8K2M3N6P9R \
  -H "Authorization: Bearer pat_live_..."
Response 200
{
  "id": "cus_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "name": "Festive saree",
  "email": "buyer@example.com",
  "phone": "+919876543210",
  "accepts_email": false,
  "accepts_whatsapp": false,
  "orders_count": 1,
  "total_spent": 49900,
  "note": "Hand block printed cotton.",
  "addresses": [
    {
      "id": "adr_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
      "name": "Festive saree",
      "line1": "string",
      "line2": "string",
      "city": "string",
      "state": "string",
      "pincode": "string",
      "country": "IN",
      "phone": "+919876543210",
      "is_default": false
    }
  ],
  "created_at": "2026-11-04T10:00:00.000Z",
  "updated_at": "2026-11-04T10:00:00.000Z"
}

Update name, contact details or note

PATCH/admin/2026-11/customers/{id}

scope write_customers

Path parameters

  • idID (cus_...)required

Headers

  • X-CSRF-Tokenstring

    Required with a seller session cookie: the value of the orb_csrf cookie.

Request body

  • namestring

    Up to 120 characters

  • emailstring or null
  • phonestring or null
  • notestring

    Up to 2000 characters

Response 200

  • idID (cus_...)required
  • namestringrequired
  • emailstring or nullrequired
  • phonestring or nullrequired
  • accepts_emailbooleanrequired
  • accepts_whatsappbooleanrequired
  • orders_countintegerrequired
  • total_spentintegerrequired
  • notestringrequired
  • addressesarray of objectrequired
  • addresses[].idID (adr_...)required
  • addresses[].namestringrequired
  • addresses[].line1stringrequired
  • addresses[].line2stringrequired
  • addresses[].citystringrequired
  • addresses[].statestringrequired
  • addresses[].pincodestringrequired
  • addresses[].countrystringrequired
  • addresses[].phonestring or nullrequired
  • addresses[].is_defaultbooleanrequired
  • created_attimestamprequired
  • updated_attimestamprequired

Errors

400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
403missing_scopeThe app token does not have the scope this endpoint needs.
404resource_not_foundThe object does not exist or belongs to another store.
409conflictThe request conflicts with the current state of the object.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl -X PATCH https://api.storelyne.com/admin/2026-11/customers/cus_01JCG8ZQ5S7T0V4X8K2M3N6P9R \
  -H "Authorization: Bearer pat_live_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Festive saree",
  "email": "buyer@example.com",
  "phone": "+919876543210"
}'
Response 200
{
  "id": "cus_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "name": "Festive saree",
  "email": "buyer@example.com",
  "phone": "+919876543210",
  "accepts_email": false,
  "accepts_whatsapp": false,
  "orders_count": 1,
  "total_spent": 49900,
  "note": "Hand block printed cotton.",
  "addresses": [
    {
      "id": "adr_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
      "name": "Festive saree",
      "line1": "string",
      "line2": "string",
      "city": "string",
      "state": "string",
      "pincode": "string",
      "country": "IN",
      "phone": "+919876543210",
      "is_default": false
    }
  ],
  "created_at": "2026-11-04T10:00:00.000Z",
  "updated_at": "2026-11-04T10:00:00.000Z"
}

Add an address

POST/admin/2026-11/customers/{id}/addresses

scope write_customersIdempotency-Key required

Path parameters

  • idID (cus_...)required

Headers

  • Idempotency-Keystringrequired

    Unique key for this request. Retries with the same key return the first response.

    At least 1 characters · Up to 255 characters

  • X-CSRF-Tokenstring

    Required with a seller session cookie: the value of the orb_csrf cookie.

Request body

  • namestringrequired

    At least 1 characters · Up to 120 characters

  • line1stringrequired

    At least 1 characters · Up to 200 characters

  • line2string

    Up to 200 characters

  • citystringrequired

    At least 1 characters · Up to 100 characters

  • statestringrequired

    At least 1 characters · Up to 100 characters

  • pincodestringrequired
  • country"IN"

    Default "IN"

  • phonestring or null
  • is_defaultboolean

    Default false

Response 201

  • idID (cus_...)required
  • namestringrequired
  • emailstring or nullrequired
  • phonestring or nullrequired
  • accepts_emailbooleanrequired
  • accepts_whatsappbooleanrequired
  • orders_countintegerrequired
  • total_spentintegerrequired
  • notestringrequired
  • addressesarray of objectrequired
  • addresses[].idID (adr_...)required
  • addresses[].namestringrequired
  • addresses[].line1stringrequired
  • addresses[].line2stringrequired
  • addresses[].citystringrequired
  • addresses[].statestringrequired
  • addresses[].pincodestringrequired
  • addresses[].countrystringrequired
  • addresses[].phonestring or nullrequired
  • addresses[].is_defaultbooleanrequired
  • created_attimestamprequired
  • updated_attimestamprequired

Errors

400idempotency_key_requiredEvery POST needs an Idempotency-Key header.
400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
403missing_scopeThe app token does not have the scope this endpoint needs.
404resource_not_foundThe object does not exist or belongs to another store.
409idempotency_in_progressA request with this Idempotency-Key is still running.
422idempotency_key_reusedThis Idempotency-Key was used with a different request.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl -X POST https://api.storelyne.com/admin/2026-11/customers/cus_01JCG8ZQ5S7T0V4X8K2M3N6P9R/addresses \
  -H "Authorization: Bearer pat_live_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Festive saree",
  "line1": "string",
  "city": "string",
  "state": "string",
  "pincode": "string"
}'
Response 201
{
  "id": "cus_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "name": "Festive saree",
  "email": "buyer@example.com",
  "phone": "+919876543210",
  "accepts_email": false,
  "accepts_whatsapp": false,
  "orders_count": 1,
  "total_spent": 49900,
  "note": "Hand block printed cotton.",
  "addresses": [
    {
      "id": "adr_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
      "name": "Festive saree",
      "line1": "string",
      "line2": "string",
      "city": "string",
      "state": "string",
      "pincode": "string",
      "country": "IN",
      "phone": "+919876543210",
      "is_default": false
    }
  ],
  "created_at": "2026-11-04T10:00:00.000Z",
  "updated_at": "2026-11-04T10:00:00.000Z"
}

Record a marketing consent choice (kept forever, newest wins)

POST/admin/2026-11/customers/{id}/consents

scope write_customersIdempotency-Key required

Path parameters

  • idID (cus_...)required

Headers

  • Idempotency-Keystringrequired

    Unique key for this request. Retries with the same key return the first response.

    At least 1 characters · Up to 255 characters

  • X-CSRF-Tokenstring

    Required with a seller session cookie: the value of the orb_csrf cookie.

Request body

  • channelenumrequired

    One of email whatsapp sms

  • grantedbooleanrequired
  • sourceenum

    One of checkout admin api import unsubscribe_link

    Default "admin"

  • text_versionstringrequired

    Which wording the buyer agreed to, for example checkout-2026-11.

    At least 1 characters · Up to 50 characters

Response 201

  • idID (cus_...)required
  • namestringrequired
  • emailstring or nullrequired
  • phonestring or nullrequired
  • accepts_emailbooleanrequired
  • accepts_whatsappbooleanrequired
  • orders_countintegerrequired
  • total_spentintegerrequired
  • notestringrequired
  • addressesarray of objectrequired
  • addresses[].idID (adr_...)required
  • addresses[].namestringrequired
  • addresses[].line1stringrequired
  • addresses[].line2stringrequired
  • addresses[].citystringrequired
  • addresses[].statestringrequired
  • addresses[].pincodestringrequired
  • addresses[].countrystringrequired
  • addresses[].phonestring or nullrequired
  • addresses[].is_defaultbooleanrequired
  • created_attimestamprequired
  • updated_attimestamprequired

Errors

400idempotency_key_requiredEvery POST needs an Idempotency-Key header.
400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
403missing_scopeThe app token does not have the scope this endpoint needs.
404resource_not_foundThe object does not exist or belongs to another store.
409idempotency_in_progressA request with this Idempotency-Key is still running.
422idempotency_key_reusedThis Idempotency-Key was used with a different request.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething went wrong on our side. Quote the trace_id to support.
curl -X POST https://api.storelyne.com/admin/2026-11/customers/cus_01JCG8ZQ5S7T0V4X8K2M3N6P9R/consents \
  -H "Authorization: Bearer pat_live_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "channel": "email",
  "granted": false,
  "text_version": "Hand block printed cotton."
}'
Response 201
{
  "id": "cus_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
  "name": "Festive saree",
  "email": "buyer@example.com",
  "phone": "+919876543210",
  "accepts_email": false,
  "accepts_whatsapp": false,
  "orders_count": 1,
  "total_spent": 49900,
  "note": "Hand block printed cotton.",
  "addresses": [
    {
      "id": "adr_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
      "name": "Festive saree",
      "line1": "string",
      "line2": "string",
      "city": "string",
      "state": "string",
      "pincode": "string",
      "country": "IN",
      "phone": "+919876543210",
      "is_default": false
    }
  ],
  "created_at": "2026-11-04T10:00:00.000Z",
  "updated_at": "2026-11-04T10:00:00.000Z"
}