Skip to main content

Create a supplier product category

POST 

https://api.staging.powerapi.com/api/v1/suppliers/:id/supplier_product_categories

Create a supplier product category

Request

Path Parameters

    id int32required

Body

required

    data

    object

    type stringrequired

    Possible values: [supplier_product_categories]

    attributes

    object

    name string

    The name of the category or subcategory.

    name_fr string

    French translation of the name

    name_de string

    German translation of the name

    name_it string

    Italian translation of the name

    name_es string

    Spanish translation of the name

    name_el string

    Greek translation of the name

    parent_category_name string

    (DEPRECATED - use parent_category relationship instead) The name of the parent category. Leave blank if you want to create a top-level category.

    delivery_schedule

    object

    monday array

    An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00

    tuesday array

    An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00

    wednesday array

    An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00

    thursday array

    An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00

    friday array

    An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00

    saturday array

    An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00

    sunday array

    An array including order lead time and deadline for this product category on this weekday. The format is: [lead-time-in-days, deadline-in-minutes-since-midnight], eg.: [2, 660] means the lead time is 2 days and the deadline is 11:00

    ordering_deadline integer

    24h format in seconds, max 86400s.

    ordering_lead_time integer

    Provide the time in seconds.

    custom_category_id string

    Customizable field that you can use to set a custom category ID. The length of the string can't exceed 100 characters.

    relationships

    object

    parent_category

    object

    data

    object

    type stringrequired

    Possible values: [supplier_product_categories]

    id stringrequired

    ID of SupplierProductCategory which will be immediate parent of the category that is being created

Responses

Create a supplier product category

Schema

    data

    object

    required

    id string
    type string

    attributes

    object

    name string
    name-fr string
    name-de string
    name-it string
    name-es string
    name-el string

    children

    object[]

  • Array [

  • id stringrequired
    name stringrequired
  • ]

  • custom-category-id string
    parent-category string
    parent-name string
    delivery-schedule object
    ordering-deadline integer
    ordering-lead-time integer
curl -L 'https://api.staging.powerapi.com/api/v1/suppliers/:id/supplier_product_categories' \
-H 'Content-Type: application/vnd.api+json' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"data": {
"type": "supplier_product_categories",
"attributes": {
"name": "string",
"name_fr": "string",
"name_de": "string",
"name_it": "string",
"name_es": "string",
"name_el": "string",
"parent_category_name": "string",
"delivery_schedule": {
"monday": [
null
],
"tuesday": [
null
],
"wednesday": [
null
],
"thursday": [
null
],
"friday": [
null
],
"saturday": [
null
],
"sunday": [
null
]
},
"ordering_deadline": 0,
"ordering_lead_time": 0,
"custom_category_id": "string"
},
"relationships": {
"parent_category": {
"data": {
"type": "supplier_product_categories",
"id": "string"
}
}
}
}
}'
Request Collapse all
Base URL
https://api.staging.powerapi.com
Auth
Parameters
— pathrequired
Body required
{
  "data": {
    "type": "supplier_product_categories",
    "attributes": {
      "name": "string",
      "name_fr": "string",
      "name_de": "string",
      "name_it": "string",
      "name_es": "string",
      "name_el": "string",
      "parent_category_name": "string",
      "delivery_schedule": {
        "monday": [
          null
        ],
        "tuesday": [
          null
        ],
        "wednesday": [
          null
        ],
        "thursday": [
          null
        ],
        "friday": [
          null
        ],
        "saturday": [
          null
        ],
        "sunday": [
          null
        ]
      },
      "ordering_deadline": 0,
      "ordering_lead_time": 0,
      "custom_category_id": "string"
    },
    "relationships": {
      "parent_category": {
        "data": {
          "type": "supplier_product_categories",
          "id": "string"
        }
      }
    }
  }
}
ResponseClear

Click the Send API Request button above and see the response here!