# Locations API

The Locations API provides eCommerce sellers with a list of delivery locations available
 at checkout. This allows customers to deliver their package to a location convenient 
 to them.


Version: 2025.1

## Servers

The base URL for the Locations API
```
https://sandbox.scurri.co.uk/locations/api/company/{company_slug}/{service_slug}
```

Variables:
- `company_slug`: The slug of your company in Scurri.
Default: "api-test-company"
- `service_slug`: The slug of the service you want to retrieve locations for.
Default: "api-test-service"

## Security

### basicAuth

All requests must be authenticated using Basic Auth. With Basic Auth, you have
to send the username and password base64-encoded in the standard Basic manner,
e.g. Authorization: Basic YXBpdGVzdDphcGkgcGFzc3dvcmQgdGVzdA==. Here is some
sample code in Python to generate the value of the header:

```python
  >>> import base64
  >>> username = 'apitest'
  >>> password = 'api-test-password'
  >>> base64.b64encode(f'{username}:{password}'.encode('ascii'))
  b'YXBpdGVzdDphcGktdGVzdC1wYXNzd29yZA=='
```


Type: apiKey
In: header
Name: Authorization

## Download OpenAPI description

[Locations API](https://docs.scurri.com/_bundle/connect/locations-api/versions/2025.1/openapi.yaml)

## Locations

Locations related endpoints

### List Delivery Locations

 - [GET /delivery/](https://docs.scurri.com/connect/locations-api/versions/2025.1/openapi/locations/getlocations.md): Retrieve delivery locations for a service based on the given parameters:

| Parameter      | Type   | Required | Description                                                                                 |
|----------------|--------|------------|-------------------------------------------------------------------------------------------|
| company_slug   | string | yes                  | The slug of your company in Scurri.                                             |
| service_slug   | string | yes                  | The slug of the carrier service whose delivery locations are to be searched.    |
| postcode       | string | no1       | The postcode being the epicentre of the search.                                 |
| country        | string | no1       | The country of the postcode.                                                    |
| latitude       | string | no2       | The latitude of the epicentre of the search.                                    |
| longitude      | string | no2       | The longitude of the epicentre of the search.                                   |
| radius         | string | no                   | The search radius in kilometers                                                 |
| limit          | string | no                   | The maximum number of points returned.                                          |
| categories     | array  | no                   | The categories of delivery locations to return. Accepts multiple values.        |

1,2 At least one set of the numbered parameters is required (either postcode+country or latitude+longitude).

