Fictional API example. This page demonstrates documentation features; its operations do not describe a live service.
This reference is generated from the OpenAPI description. It shows the operation contract; follow any related guides below for task steps and context.
OpenAPI for this operation: Download JSON.
POST /Enrollments
Create a parcel enrollment
Create one of four enrollment shapes. The service accepts different required fields for each program; the examples illustrate the shapes but have not been sent to a server.
Servers
https://sandbox.api.cedar-parcel.example/v1 — Enrollment sandbox only
Authentication
API key
API key in header X-Application-Key.
Enrollment-only key.
Request body
Required.
Choose the program that matches the parcels you will dispatch.
application/json
Use exactly one of these shapes:
Local pickup · 6 properties
A shop with ordinary pickup windows.
6 properties
-
programstringrequired ⓘconst: "local"
-
organizationobjectrequired ⓘ3 properties
-
displayNamestringrequired ⓘName shown on parcel labels.
-
addressobjectrequired ⓘ5 properties
-
line1stringrequired ⓘStreet and number.
-
line2stringoptional nullable ⓘAdditional address line, if present.
-
citystringrequired ⓘ -
regionstringrequired ⓘ -
postalCodestringrequired ⓘ
-
-
registrationCodestringoptional nullable ⓘOptional local registration code.
-
-
contactobjectrequired ⓘ3 properties
-
namestringrequired ⓘ -
emailstringrequired ⓘformat: email
-
phonestringoptional nullable ⓘ
-
-
pickupWindowslist of objectrequired ⓘThe windows when parcels can be collected.
Array items:
3 properties
-
dayenum<string>required ⓘ -
opensAtstringrequired ⓘLocal time in HH:mm format.
-
closesAtstringrequired ⓘLocal time in HH:mm format.
-
-
fragileHandlingbooleanoptional ⓘdefault: false
-
notesstringoptional nullable ⓘ
Chilled goods · 6 properties
Requires a temperature range and handling instructions.
6 properties
-
programstringrequired ⓘconst: "chilled"
-
organizationobjectrequired ⓘ3 properties
-
displayNamestringrequired ⓘName shown on parcel labels.
-
addressobjectrequired ⓘ5 properties
-
line1stringrequired ⓘStreet and number.
-
line2stringoptional nullable ⓘAdditional address line, if present.
-
citystringrequired ⓘ -
regionstringrequired ⓘ -
postalCodestringrequired ⓘ
-
-
registrationCodestringoptional nullable ⓘOptional local registration code.
-
-
contactobjectrequired ⓘ3 properties
-
namestringrequired ⓘ -
emailstringrequired ⓘformat: email
-
phonestringoptional nullable ⓘ
-
-
temperatureRangeobjectrequired ⓘ2 properties
-
minimumCelsiusnumberrequired ⓘ -
maximumCelsiusnumberrequired ⓘ
-
-
handlingNotesstringoptional ⓘInstructions printed for handlers.
-
sensorRequiredbooleanoptional ⓘdefault: true
Bulk dispatch · 7 properties
Requires an estimated volume and manifest format.
7 properties
-
programstringrequired ⓘconst: "bulk"
-
organizationobjectrequired ⓘ3 properties
-
displayNamestringrequired ⓘName shown on parcel labels.
-
addressobjectrequired ⓘ5 properties
-
line1stringrequired ⓘStreet and number.
-
line2stringoptional nullable ⓘAdditional address line, if present.
-
citystringrequired ⓘ -
regionstringrequired ⓘ -
postalCodestringrequired ⓘ
-
-
registrationCodestringoptional nullable ⓘOptional local registration code.
-
-
contactobjectrequired ⓘ3 properties
-
namestringrequired ⓘ -
emailstringrequired ⓘformat: email
-
phonestringoptional nullable ⓘ
-
-
monthlyParcelEstimateintegerrequired ⓘexclusiveMinimum: 0
Example 1 (authored in OpenAPI):
8000Example 2 (authored in OpenAPI):
12000 -
manifestFormatenum<string>required ⓘ -
callbackUrlstringoptional nullable ⓘformat: uri
-
customMetadataany valueoptional nullable ⓘAny value is allowed.
Combined program · 8 properties
Supplies pickup, temperature, and volume details.
8 properties
-
programstringrequired ⓘconst: "combined"
-
organizationobjectrequired ⓘ3 properties
-
displayNamestringrequired ⓘName shown on parcel labels.
-
addressobjectrequired ⓘ5 properties
-
line1stringrequired ⓘStreet and number.
-
line2stringoptional nullable ⓘAdditional address line, if present.
-
citystringrequired ⓘ -
regionstringrequired ⓘ -
postalCodestringrequired ⓘ
-
-
registrationCodestringoptional nullable ⓘOptional local registration code.
-
-
contactobjectrequired ⓘ3 properties
-
namestringrequired ⓘ -
emailstringrequired ⓘformat: email
-
phonestringoptional nullable ⓘ
-
-
pickupWindowslist of objectrequired ⓘArray items:
3 properties
-
dayenum<string>required ⓘ -
opensAtstringrequired ⓘLocal time in HH:mm format.
-
closesAtstringrequired ⓘLocal time in HH:mm format.
-
-
temperatureRangeobjectrequired ⓘ2 properties
-
minimumCelsiusnumberrequired ⓘ -
maximumCelsiusnumberrequired ⓘ
-
-
monthlyParcelEstimateintegerrequired ⓘminimum: 1
-
manifestFormatenum<string>required ⓘ -
callbackUrlstringoptional nullable ⓘformat: uri
Responses
201: Created
application/json
The enrollment was recorded. Review may still be pending.
4 properties
-
enrollmentIdstringalways present ⓘ -
statusenum<string>always present ⓘ -
warningslist of stringalways present ⓘArray items:
string
-
approvedAtstringalways present nullable ⓘformat: date-time
Always present; null until approved.
400: Bad Request
application/problem+json
The selected program is missing one or more required fields.
4 properties
-
typestringalways present ⓘformat: uri
-
titlestringalways present ⓘ -
statusintegeralways present ⓘ -
detailstringmay be absent ⓘ