Skip to main content
POST
/
api
/
v2
/
platform
/
shipping_categories
Create a Shipping Category
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({shipping_category: {name: 'Another Category'}})
};

fetch('http://{defaultHost}/api/v2/platform/shipping_categories', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "data": {
    "id": "138",
    "type": "shipping_category",
    "attributes": {
      "name": "ShippingCategory 138",
      "created_at": "2022-11-08T19:35:21.863Z",
      "updated_at": "2022-11-08T19:35:21.863Z"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
shipping_category
object
required

Response

Record created

data
object
required