CSQ Docs
    CSQ Docs
    CSQ API Doc
    • CSQ API Doc
    • Dummy Product Usage Guide
    • Back to home
    • Location-based Products
    • Get Labels
      GET
    • Get Countries
      GET
    • Get Categories
      GET
    • Get States
      GET
    • Get Municipalities
      GET
    • Get Deliver Locations
      GET
    • Get Products
      GET
    • Create Cart
      POST
    • Purchase
      POST
    • Get Orders
      GET
    • Get Order Status
      GET

      Get States

      GET
      /physical-products/states/{terminalId}/{categoryId}/{levelId}
      This endpoint returns the list of available states or provinces for a given terminal, category, and location level. It is part of the dynamic flow and may be skipped depending on the product type.

      🔍 Description#

      Use this method to:
      Retrieve the list of states relevant to the selected category and location
      Continue the location-based flow toward product selection or delivery configuration
      Dynamically determine the next step using nextPath and nextField

      📥 Request Details#

      Method: GET
      Authentication: Required
      Path Parameters:
      terminalId (integer)
      categoryId (integer)
      levelId (integer)

      📤 Response#

      Returns an array of state objects:
      FieldTypeDescription
      stateIdintegerUnique identifier of the state
      namestringDisplay name of the state
      nextPathstringPath to the next endpoint in the flow
      nextFieldstringField name required in the next step, as defined in Get Labels

      Example#

      [
        {
          "stateId": 201,
          "name": "Comunidad de Madrid",
          "nextPath": "/physical-products/municipalities/{terminalId}/101/201",
          "nextField": "municipalityId"
        }
      ]

      🧠 Usage Notes#

      This step may be omitted for certain categories (e.g., digital products).
      Always follow the nextPath and nextField to maintain flow continuity.
      The stateId is used in the next step to retrieve municipalities or delivery zones.

      Request

      Path Params
      terminalId
      integer <int32>
      required
      categoryId
      integer <int32>
      required
      levelId
      integer <int32>
      required
      Header Params
      U
      string 
      required
      Default:
      {{U}}
      SH
      string 
      required
      Default:
      {{SH}}
      ST
      string 
      required
      Default:
      {{ST}}

      Request samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request GET 'https://evsb.csqworld.com/physical-products/states///' \
      --header 'U;' \
      --header 'SH;' \
      --header 'ST;'

      Responses

      🟢200OK
      application/json
      OK
      Body
      array of:
      stateId
      integer 
      required
      name
      string 
      required
      name
      nextPath
      string 
      required
      nextField
      string 
      required
      Example
      [
          {
              "stateId": 3,
              "name": "state",
              "nextPath": "/physical-products/{{nextPath}}/{{terminalId}}/{{categoryId}}/{{levelId}}",
              "nextField": "{nextField}"
          }
      ]
      Modified at 2025-07-07 10:55:53
      Previous
      Get Categories
      Next
      Get Municipalities
      Built with