Create an easypost pickup

How to create an easypost pickup via API

To create a new easypost pickup, send a POST request to the /api/easypost_pickups endpoint, passing the resource arguments in the request body.

Request

POST https://yourdomain.commercelayer.io/api/easypost_pickups

Arguments

Body Parameter
Type
Required

type

string

Required

attributes.reference

string

Optional

attributes.reference_origin

string

Optional

attributes.metadata

object

Optional

attributes.instructions

string

Optional

attributes.min_datetime

datetime

Required

attributes.max_datetime

datetime

Required

relationships.shipment

object

Required

Example

The following request creates a new easypost pickup:

curl -g -X POST \
  'https://yourdomain.commercelayer.io/api/easypost_pickups' \
  -H 'Accept: application/vnd.api+json' \
  -H 'Authorization: Bearer your-access-token' \
  -H 'Content-Type: application/vnd.api+json' \
  -d '{
  "data": {
    "type": "easypost_pickups",
    "attributes": {
      "min_datetime": "2018-01-01T12:00:00.000Z",
      "max_datetime": "2018-01-01T12:00:00.000Z"
    },
    "relationships": {
      "shipment": {
        "data": {
          "type": "shipments",
          "id": "ABCRtyUpBa"
        }
      }
    }
  }
}'

Last updated