Skip to content

Latest commit

 

History

History
83 lines (65 loc) · 2.68 KB

File metadata and controls

83 lines (65 loc) · 2.68 KB
title description last_updated template
Glue API: Add shipment types
Learn how to add shipment types using Glue API
Nov 23, 2023
glue-api-storefront-guide-template

This endpoint lets you add shipment types.

Installation

Install the Shipment feature

Add a shipment type point


POST /service-types


Request

HEADER KEY HEADER VALUE REQUIRED DESCRIPTION
Authorization string Alphanumeric string that authorizes the warehouse user to send requests to protected resources. Get it by authenticating as a warehouse user.

Request sample: POST https://glue-backend.mysprykershop.com/shipment-types

{
    "data": {
        "type": "shipment-types",
        "attributes": {
            "name": "Locker pickup",
            "key": "l-pickup",
            "isActive": "true",
            "stores": ["DE", "AT"]
        }
    }
}
ATTRIBUTE TYPE REQUIRED DESCRIPTION
name String You will use it as a reference when adding shipment types to offers in the Merchant portal.
key String Unique identifier of the shipment type.
isActive Boolean Defines if the shipment type is active. You can only add active shipment types to offers.
stores Object Defines the stores the shipment type is to be available for.

Response

Response sample:

{
    "data": {
        "type": "shipment-types",
        "id": "fa575a58-5119-5407-a00b-d1aa01fec63d",
        "attributes": {
            "name": "Locker pickup",
            "key": "l-pickup",
            "isActive": true,
            "stores": [
                "DE",
                "AT"
            ]
        },
        "links": {
            "self": "https://glue-backend.mysprykershop.com/shipment-types/fa575a58-5119-5407-a00b-d1aa01fec63d"
        }
    }
}

{% include pbc/all/glue-api-guides/{{page.version}}/shipment-types-response-attributes.md %}

Possible errors

CODE REASON
5502 A shipment type with the same key already exists.

To view generic errors that originate from the Glue Application, see Reference information: GlueApplication errors.