Skip to content

List available allocations

Description

Displays a list of all allocations for a given company_id.

GET https://impact.dots.eco/api/v1/allocations?company_id={company_id}&langcode={Langcode}

Please check Headers and authorization.

Parameters

company_id - required*, integer - The Id of company.

langcode - optional, string - Returns the response in the provided language code. List of supported languages can be found here. Defaults to English.

Example request

The minimal request that will work

curl --location --request GET 'https://impact.dots.eco/api/v1/allocations?company_id=1' \
--header 'Content-Type: application/json' \
--header 'auth-token: YOUR_AUTH_TOKEN' \
--data-raw '{
}'

Key/Value pairs response body

  • "allocation_name": [string] - Name of the allocation.
  • "display_name": [string] - Allocation Display Name
  • "allocation_id": [integer] - Allocation ID
  • "allocation_description": [string] Allocation Description
  • "allocation_long_description": [string] Allocation long Description
  • "allocation_singular_label": [string] - Allocation singular label
  • "allocation_plural_label": [string] - Allocation plural label
  • "msrp_price": [float] - MSRP price
  • "msrp_currency": [string] - MSRP currency
  • "allocation_image": [string] - Allocation Image
  • "price_per_unit": [object] - Price per unit

Example response

{
    "2": {
        "allocation_name": "Allocation",
        "display_name": "Allocation display name",
        "allocation_id": "2",
        "allocation_description": "Allocation Description",
        "allocation_long_description": "Allocation long Description",
        "allocation_singular_label": "Allocation [qty] ft2 land",
        "allocation_plural_label": "Allocations [qty] ft2 land",
        "msrp_price": 0.5,
        "msrp_currency": "USD",
        "price_per_unit": {
          "number": "0.650000",
          "currency_code": "USD"
        },
        "allocation_image": "https://impact.dots.eco/sites/default/allocation_image.jpeg"
    }
}

Possible error responses

Not Found

{
    "message": "Invalid company id."
}

Status: 404 Not Found

{
    "message": "Access denied: you don't have permissions to see allocations of this company."
}

Status: 403 Forbidden

{
    "message": "No results found for specified criteria."
}

Status: 404 Not Found