Places
Create, list, and edit the places where stock is kept.
Paths are relative to https://api.agentpost.tools/v1/resources. Who may call explains each credential.
Create a place
POST /places
Creates a place.
- Who may call: Your server, with your project’s secret key.
- Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.places.create(body) - Idempotency-Key: optional. Retrying a write has the rule.
Body
| Name | Type | Required | Description |
|---|---|---|---|
key |
string |
Yes | 1–200 characters. |
name |
string |
Yes | 1–200 characters. |
attributes |
object |
No | Each value is a string. |
Response
201 Created, with PlaceResponse.
Errors
invalid_request(400)payload_too_large(413)key_in_use(409)
Any operation can also answer with the codes Conventions lists.
List places
GET /places
Lists the places in the project.
- Who may call: Your server, with your project’s secret key.
- Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.places.list(query) - Pages:
limit, 1 to 500, default 100, withnextandafter. Lists has the rule.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
after |
string |
No | 1–200 characters. |
limit |
integer |
No | 1–500; default 100. |
Response
200 OK, with PlacesPage.
Errors
invalid_request(400)
Any operation can also answer with the codes Conventions lists.
Update a place
PATCH /places/:id
Edits a place.
- Who may call: Your server, with your project’s secret key.
- Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - SDK:
client.places.patch(id, body) - Idempotency-Key: optional. Retrying a write has the rule.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | Place ID, plc_…. The id of a Place. |
Body
| Name | Type | Required | Description |
|---|---|---|---|
key |
string |
No | 1–200 characters. |
name |
string |
No | 1–200 characters. |
attributes |
object or null |
No | Each value is a string. |
Response
200 OK, with PlaceResponse.
Errors
invalid_request(400)payload_too_large(413)not_found(404)key_in_use(409)
Any operation can also answer with the codes Conventions lists.
The PlaceResponse object
| Name | Type | Present | Description |
|---|---|---|---|
place |
Place |
Always |
The PlacesPage object
| Name | Type | Present | Description |
|---|---|---|---|
places |
Place array |
Always | |
next |
string |
When set |
The Place object
| Name | Type | Present | Description |
|---|---|---|---|
key |
string |
Always | 1–200 characters. |
name |
string |
Always | 1–200 characters. |
attributes |
object |
When set | Each value is a string. |
id |
string |
Always | Place ID, plc_…. |