Skip to content
Agentpost robot in sunglasses on a red circleAgentpost

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 dev secret key, sk_test_…, as Authorization: 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

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 dev secret key, sk_test_…, as Authorization: Bearer <token>.
  • SDK: client.places.list(query)
  • Pages: limit, 1 to 500, default 100, with next and after. 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

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 dev secret key, sk_test_…, as Authorization: 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

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_….