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 Countries

      GET
      /physical-products/countries/{terminalId}
      This endpoint returns the list of available countries for a given terminal, allowing clients to begin a location-based product flow. It is typically the first step in selecting a geographic context for physical or virtual product delivery.

      🔍 Description#

      Use this method to:
      Retrieve the display labels for the country selection field.
      Identify the internal field name (countryId) used in subsequent requests.
      Determine the next endpoint to call (nextPath) and the required parameter (nextField) for continuing the dynamic flow.
      This method does not return simply a list of countries. Instead, it provides structural metadata to guide the dynamic flow.

      📥 Request Details#

      Method: GET
      Authentication: Required
      Path Parameter:
      terminalId (integer): Unique identifier of the terminal making the request

      📤 Response#

      Returns an array of metadata objects with key information to follow the dynamic flow. Each object includes:
      FieldTypeDescription
      countryIdintegerUnique identifier for the country
      namestringDisplay name of the country
      nextPathstringRelative path of the next endpoint to call, with placeholders, including the levelIdat the end.
      nextFieldstringId of the name of the field that should be used in the next step of the dynamic flow, as defined in the Get Labels response.

      Example Response#

      [
        {
          "countryId": 1,
          "name": "Spain",
          "nextPath": "/physical-products/categories/{terminalId}/1",
          "nextField": "categoryId"
        },
        {
          "countryId": 2,
          "name": "Mexico",
          "nextPath": "/physical-products/categories/{terminalId}/2",
          "nextField": "categoryId"
        }
      ]

      🧠 Usage Notes#

      This method is typically used to initialize the flow and configure UI labels dynamically.
      The nextPath and nextField guide the client to the next step in the product selection process.
      The actual list of countries is retrieved in a later step, once the flow is activated.

      Request

      Path Params
      terminalId
      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/countries/' \
      --header 'U;' \
      --header 'SH;' \
      --header 'ST;'

      Responses

      🟢200OK
      application/json
      OK
      Body
      array of:
      countryId
      integer 
      required
      name
      string 
      required
      nextPath
      string 
      required
      nextField
      string 
      required
      Example
      [
          {
              "countryId": 1,
              "name": "country",
              "nextPath": "/physical-products/{{nextPath}}/{{terminalId}}/{{levelId}}",
              "nextField": "{nextField}"
          }
      ]
      Modified at 2025-07-07 10:45:26
      Previous
      Get Labels
      Next
      Get Categories
      Built with