Search Documentation

Search for a documentation page...

Pickup Locations API

REST API endpoints for managing in-store pickup locations.

Pickup locations are physical addresses where customers can collect their orders instead of having them shipped. Each location has an internal label, a customer-facing name, and a full postal address.

List Pickup Locations

GET /api/v1/pickup-locations

Returns the store's pickup locations, paginated.

Query Parameters

ParameterTypeDefaultDescription
limitnumber50Locations per page (1-100)
offsetnumber0Locations to skip
curl -H "Authorization: Bearer your_api_key" \
https://your-store.yns.store/api/v1/pickup-locations

Response (200)

{
"data": [
{
"id": "0191abc0-1234-7def-8000-000000000001",
"label": "Downtown store",
"name": "Acme Downtown",
"company": "Acme Inc.",
"line1": "123 Main St",
"line2": "Suite 4",
"city": "Springfield",
"state": "IL",
"postalCode": "62701",
"country": "US",
"phone": "+1-555-0100",
"createdAt": "2024-06-15T10:30:00.000Z",
"updatedAt": "2024-06-15T10:30:00.000Z"
}
],
"meta": {
"count": 1,
"offset": 0,
"limit": 50
}
}

Get Pickup Location

GET /api/v1/pickup-locations/{id}

Returns a single pickup location by UUID.

curl -H "Authorization: Bearer your_api_key" \
https://your-store.yns.store/api/v1/pickup-locations/0191abc0-1234-7def-8000-000000000001

Response (200)

{
"id": "0191abc0-1234-7def-8000-000000000001",
"label": "Downtown store",
"name": "Acme Downtown",
"company": "Acme Inc.",
"line1": "123 Main St",
"line2": "Suite 4",
"city": "Springfield",
"state": "IL",
"postalCode": "62701",
"country": "US",
"phone": "+1-555-0100",
"createdAt": "2024-06-15T10:30:00.000Z",
"updatedAt": "2024-06-15T10:30:00.000Z"
}

Create Pickup Location

POST /api/v1/pickup-locations

Creates an in-store pickup location customers can collect orders from.

Request Body

FieldTypeRequiredDescription
labelstringYesInternal label for the pickup location
namestringYesLocation/recipient name shown to customers
citystringYesCity
countrystringYesISO country code
line1stringYesStreet address line 1
postalCodestringYesPostal/ZIP code
phonestringYesContact phone number
companystringNoOptional company name
line2stringNoOptional street address line 2
statestringNoOptional state/province
curl -X POST \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"label": "Downtown store",
"name": "Acme Downtown",
"line1": "123 Main St",
"city": "Springfield",
"postalCode": "62701",
"country": "US",
"phone": "+1-555-0100"
}' \
https://your-store.yns.store/api/v1/pickup-locations

Response (201)

Returns the created pickup location (same shape as Get Pickup Location).


Update Pickup Location

PATCH /api/v1/pickup-locations/{id}

Replaces a pickup location's address fields. All required fields from Create Pickup Location must be supplied.

Request Body

Same fields as Create Pickup Location.

curl -X PATCH \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"label": "Downtown store",
"name": "Acme Downtown",
"line1": "456 Market St",
"city": "Springfield",
"postalCode": "62701",
"country": "US",
"phone": "+1-555-0100"
}' \
https://your-store.yns.store/api/v1/pickup-locations/0191abc0-1234-7def-8000-000000000001

Response (200)

Returns the updated pickup location.


Delete Pickup Location

DELETE /api/v1/pickup-locations/{id}

Hard-deletes the pickup location by UUID.

curl -X DELETE \
-H "Authorization: Bearer your_api_key" \
https://your-store.yns.store/api/v1/pickup-locations/0191abc0-1234-7def-8000-000000000001

Response (200)

{
"ok": true,
"deleted": 1
}