> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a location

> Create a location

### Path parameters

**id** `string` *required*

Trading partner id

### Request body

`LocationXrefInput`

**description** `string,null`

**location\_id** `string` *required*

**location\_type** `string,null`

**partner\_location\_id** `string` *required*

**ship\_to** `string,null`

### Response

`LocationXref`

**created\_at** `string (date-time)` *required*

**description** `string,null`

**id** `string` *required*

**location\_id** `string` *required*

Our location / warehouse id.

**location\_type** `string,null`

`store`, `dc`, … (free text, informational).

**partner\_id** `string` *required*

**partner\_location\_id** `string` *required*

The partner's store / DC number (N1\*ST/N104). Numeric values match regardless of leading zeros.

**ship\_to** `string,null`

Our ship-to code, if it differs from the location id.

**tenant\_id** `string` *required*

**updated\_at** `string (date-time)` *required*

### Status codes

| Code | Meaning |
| - | - |
| `200` | Created |
| `409` | Partner location already mapped |
| `422` | Invalid input |

### Using this contract

Read the [source OpenAPI document](/spec/edi.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

```bash cURL theme={null}
curl --silent --show-error --fail-with-body --request POST \
  --url 'https://api.edi.stateset.com/v1/partners/{id}/xref/locations' \
  --header "Authorization: Bearer $EDI_API_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "Two-person tent, green — replacement for damaged pole set.",
  "location_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "location_type": "string",
  "partner_location_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "ship_to": "string"
}'
```

```json 200 theme={null}
{
  "created_at": "2026-08-31T14:22:05Z",
  "description": "Two-person tent, green — replacement for damaged pole set.",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "location_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "location_type": "string",
  "partner_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "partner_location_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "ship_to": "string",
  "tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "updated_at": "2026-08-31T14:22:05Z"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.