Postman Collection
For easy configuration and testing, here's a Postman collection you can import into Postman.
Download the Postman Collection
Configuration Notes:
Before making API requests, update the following placeholders and headers to match your setup:
- URL Placeholders: Replace
<tenant-id>
,<environment>
, and<space-id>
with your specific tenant, environment, and space values. - Data Residency: Replace
<data-residency>
with one of these options: eu, us, in, au, or uae. - Headers: For Products API: Set x-api-key to your access token. For Spaces API: Use the Authorization header with the value Bearer
<access token>
.
Authentication
To use the Grid Products API, every request requires an access token. Here's how to generate one:
- Go to the Apps → Developer tab in the Phygrid Console.
- Generate an Access Token.
- Add Authorization in the API request header, with the Bearer
<access token>
as value for the Spaces related endpoints below
URLs Overview
The following endpoints are available in the Spaces API currently.
Grid Admin API: https://api.omborigrid.com/api
In every endpoint you will need to replace {base-url}
with the URL specified above.
Method | Endpoint | Description |
---|---|---|
GET | spaces | Returns a list of tenant’s spaces |
GET | spaces/{id} | Retrieves specific space by ID |
POST | spaces | Creates a space record into the database |
DELETE | spaces | Removes specified space ID from the database |
PUT | spaces/{id} | Update specified space in the database |
DELETE | spaces/{spaceId}/products | Removes products from space |
Spaces
GET Spaces List
Returns a list of tenant's spaces.
GET {base-url}/spaces
Query Parameters
To use query parameters, add them as GET properties to the URL.
Parameter | Type | Description | Example |
---|---|---|---|
organizationId | string | The tenant id in grid console | 61cxxxxxxxxxxxxxxx |
Response
Array<Space>
GET Space by ID
Retrieves specific space by ID.
GET {base-url}/spaces/{id}
Query Parameters
To use query parameters, add them as GET properties to the URL.
Parameter | Type | Description | Example |
---|---|---|---|
id | string | The ID of the space | 61cxxxxxxxxxxxxxxx |
Response
Space
Reference: Space
POST (Create) Space
Creates a space record
POST {base-url}/spaces
Body
The body of the request should be a Space JSON format using the content-type
header application/json
.
Parameter | Type | Description | Example |
---|---|---|---|
organizationId | string | The organization/tenant where the space will be created | 61cxxxxxxxxxxxxxxx |
displayName | string | The name of the space to be displayed | Store #1 |
type | string | The type of the space (location, section, custom) | location |
longitude | number | Longitude of the space | 59.32960273523599 |
latitude | number | Latitude of the space | 18.06886331765492 |
externalId | string | Id of the space managed externally | store_1 |
country | string | The name of the country | Sweden |
state | string | The name of the state | Sweden |
city | string | The name of the city | Stockholm |
address | string | The address | Street#1 |
postcode | string | Represents the postal code | 111 37 |
weeklySchedule | object | The normal opening hours | {"0": {"from": "08:00", "to": "17:30", "isOpen": true}, ...} “0” represents Monday |
notes | string | Add notes to the space | Note#1 sample |
Response
Space
Reference: Space
PUT (Update) Space
Updates a space record
PUT {base-url}/spaces/{id}
Query Parameters
Parameter | Type | Description | Example |
---|---|---|---|
id | string | The ID of the space | 61cxxxxxxxxxxxxxxx |
Body
The body of the request should be a Space JSON format using the content-type
header application/json
.
Parameter | Type | Description | Example |
---|---|---|---|
organizationId | string | The organization/tenant where the space will be created | 61cxxxxxxxxxxxxxxx |
displayName | string | The name of the space to be displayed | Store #1 |
type | string | The type of the space (‘location’, ‘section’) | location |
longitude | number | Longitude of the space | 59.32960273523599 |
latitude | number | Latitude of the space | 18.06886331765492 |
externalId | string | ID of the space managed externally | store_1 |
country | string | The name of the country | Sweden |
state | string | The name of the state | Sweden |
city | string | The name of the city | Stockholm |
address | string | The address | Street#1 |
postcode | string | Represents the postal code | 111 37 |
weeklySchedule | object | The normal opening hours | {"0": {"from": "08:00", "to": "17:30", "isOpen": true}, ...} |
notes | string | Add notes to the space | Note#1 sample |
Response
Space
Reference: Space
DELETE Space
Deletes a Space record.
DELETE {base-url}/spaces/{id}
Query Parameters
Parameter | Type | Description | Example |
---|---|---|---|
id | string | The ID of the space | 61cxxxxxxxxxxxxxxx |
Response
Space
Reference: Space