Skip to main content
Version: v0.2b

Create unassigned stop with custom properties

Prerequisites

Here we will be using the List custom stop properties endpoint to fetch the custom stop properties defined in your team. Afterwards, we will use the Create a new unassigned stop endpoint to create an unassigned stop with a custom stop property.

Note that custom stop properties can be added to Stops and Unassigned Stops when using Create, Batch import, or Update endpoints. They are also included in the response of List and Retrieve endpoints.

# First, get the custom stop properties from your team
curl https://api.getcircuit.com/public/v0.2b/team/customStopProperties \
-u <your-api-key>:

# The response will be similar to the following:
# {
# "customStopProperties": [
# {
# "id": "aed6447b-00f9-445d-8f3d-8ec5ef4d3d05", // a random id
# "name": "Invoice Number" // the name of your custom stop property
# ...
# },
# ...
# ]
# }

# Replace <custom-stop-property-id> with a custom stop property 'id'
# from the previous request.
unassigned_stop_data='{
"address": {
"addressLineOne": "221B Baker Street, London"
},
"customProperties": {
"<custom-stop-property-id>": "INV-123"
}
}'

# Create a new unassigned stop with custom properties
# The response contains information about the created unassigned stop
# including the custom stop property.
curl -X POST https://api.getcircuit.com/public/v0.2b/unassignedStops \
-d "$unassigned_stop_data" \
-H 'Content-Type: application/json' \
-u <your-api-key>: