Pickup Locations

Manage in-store pickup addresses offered at checkout

GET /admin/api/pickup-locations

List every pickup location ordered by `sort_order` ascending then `id`. Disabled locations are included so the merchant can re-enable them; the storefront only offers enabled locations at checkout.

Response 200

[
  {
    "id": 1,
    "name": "Sofia – Vitosha Blvd store",
    "line1": "Vitosha Blvd 25",
    "line2": null,
    "city": "Sofia",
    "state": null,
    "postal_code": "1000",
    "country": "BG",
    "phone": "+359 2 123 4567",
    "hours": "Mon–Sat 10:00–20:00",
    "instructions": "Ring the bell at the side entrance.",
    "enabled": true,
    "sort_order": 0,
    "created_at": "2026-04-25T10:00:00Z",
    "updated_at": "2026-04-25T10:00:00Z"
  }
]

Example

curl "https://yourshop.zeroshop.io/admin/api/pickup-locations" \
  -H "Authorization: Bearer zspat_..."
POST /admin/api/pickup-locations

Create a pickup location. New locations default to enabled and to a sort_order chosen by the server. Use the PUT endpoint to change ordering or enabled state.

Request Body

{
  "name": "Sofia – Vitosha Blvd store",
  "line1": "Vitosha Blvd 25",
  "line2": null,
  "city": "Sofia",
  "state": null,
  "postal_code": "1000",
  "country": "BG",
  "phone": "+359 2 123 4567",
  "hours": "Mon–Sat 10:00–20:00",
  "instructions": "Ring the bell at the side entrance."
}

Response 201

{
  "id": 1,
  "name": "Sofia – Vitosha Blvd store",
  "line1": "Vitosha Blvd 25",
  "line2": null,
  "city": "Sofia",
  "state": null,
  "postal_code": "1000",
  "country": "BG",
  "phone": "+359 2 123 4567",
  "hours": "Mon–Sat 10:00–20:00",
  "instructions": "Ring the bell at the side entrance.",
  "enabled": true,
  "sort_order": 0,
  "created_at": "2026-04-25T10:00:00Z",
  "updated_at": "2026-04-25T10:00:00Z"
}

Example

curl -X POST "https://yourshop.zeroshop.io/admin/api/pickup-locations" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sofia – Vitosha Blvd store",
    "line1": "Vitosha Blvd 25",
    "city": "Sofia",
    "postal_code": "1000",
    "country": "BG"
  }'
PUT /admin/api/pickup-locations/{id}

Replace every field on the pickup location. The body must include `enabled` and `sort_order`; both are required (unlike on POST, where the server picks defaults).

Request Body

{
  "name": "Sofia – Vitosha Blvd store",
  "line1": "Vitosha Blvd 25",
  "city": "Sofia",
  "postal_code": "1000",
  "country": "BG",
  "enabled": true,
  "sort_order": 1
}

Response 204

Example

curl -X PUT "https://yourshop.zeroshop.io/admin/api/pickup-locations/1" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sofia – Vitosha Blvd store",
    "line1": "Vitosha Blvd 25",
    "city": "Sofia",
    "postal_code": "1000",
    "country": "BG",
    "enabled": true,
    "sort_order": 1
  }'
DELETE /admin/api/pickup-locations/{id}

Delete a pickup location. Orders that referenced this location keep their copied shipping address — the foreign key is set to NULL via `ON DELETE SET NULL`.

Response 204

Example

curl -X DELETE "https://yourshop.zeroshop.io/admin/api/pickup-locations/1" \
  -H "Authorization: Bearer zspat_..."

We value your privacy

We use cookies for essential site functionality and, with your consent, analytics to understand how our platform is used. No personal data is shared with third parties. See our Privacy Policy for details.