Site
CRUD
| CRUD | Http Verb | Route | Description | 
|---|---|---|---|
| READ | GET | /site/{id} | Retrieve a single Site from it's id | 
| UPDATE | POST | /site/{id} | Update a single Site | 
Model
WARNING: This Model is the one retrieve using X-API-MODE="get" (see READ operation). So if you use the legacy one (standard), the model may differs on some fields.
| Field | Type | Readonly | Nullable | Translatable | Description | 
|---|---|---|---|---|---|
| address | string |  |  |  | Postal address | 
| city | string |  |  |  | City name | 
| client_id | string |  |  |  | An arbitrary field used to store external identfier to match our own | 
| cp | string |  |  |  | Postal code | 
| created_at | datetime (ISO 8601) |  |  |  | Create datetime | 
| description | string |  |  |  | A field used to give general information about the Site | 
| direction | string |  |  |  | Information about how to go to the Site | 
| string |  |  |  | Contact email address of the Site | |
| gps_positions | array |  |  |  | Array of gps positions references used to geolocalize the Site | 
| gps_positions[] | object |  |  |  | |
| gps_positions[].altitude | float |  |  |  | The altitude of the point in real world | 
| gps_positions[].longitude | float |  |  |  | The longitude of the point in real world | 
| gps_positions[].latitude | float |  |  |  | The latitude of the point in real world | 
| gps_positions[].x | float |  |  |  | The x coordinate in our 3D system | 
| gps_positions[].y | float |  |  |  | The y coordinate in our 3D system | 
| gps_positions[].z | float |  |  |  | The z coordinate in our 3D system | 
| gps_transform | array |  |  |  | 3*3 transformation matrix used to convert UTM system to 3D system | 
| gps_transform[] | float |  |  |  | |
| gps_translate | array |  |  |  | 3D translation vector used to convert UTM system to 3D system | 
| gps_translate[] | float |  |  |  | |
| id | int |  |  |  | The identifier | 
| languages | array |  |  |  | List of available locales used in that Site. This means all translatable data may be available in each of theses languages. | 
| languages[] | string |  |  |  | One of supported locale: "en", "fr", "de", "it", "es", "zh", "ja", "ko", "da", "cs". Need more ? Ask us. | 
| locale | string |  |  |  | Use to define the default locale to use on that Site. It must be one of Site#languages locale. May be null only if localization is not needed with empty languages array. | 
| logo | File#id |  |  |  | The File identifier that contains the logo image. | 
| metadata | array |  |  |  | An array of metadatum used to store additional arbitrary data | 
| metadata[] | object |  |  |  | |
| metadata[].key | string |  |  |  | Metadatum unique key | 
| metadata[].type | string |  |  |  | Metadatum value type | 
| metadata[].value | mixed |  |  |  | Metadatum value | 
| name | string |  |  |  | Name | 
| opening | string |  |  |  | Opening hours | 
| phone | string |  |  |  | Phone number | 
| signature | string |  |  |  | Unique optional identifier used to reference that Site to be used in data import | 
| target_platforms | array |  |  |  | [Depreciated] | 
| target_platforms[] | string |  |  |  | |
| version | int |  |  |  | Revision version, it's incremented on each change | 
| updated_at | datetime(ISO 8601) |  |  |  | Last updated datetime | 
READ
Parameters
| Name | In | Type | Required | Default | Constraint | Description | 
|---|---|---|---|---|---|---|
| id | Route | int |  |  | ||
| X-API-LOCALE | Header | string |  | Site#locale | Must be one of Site#languages | |
| X-API-MODE | Header | string |  | standard | "standard" or "get" | The "standard" mode is deprecated. Note that X-API-MODE will change serialization format. | 
Responses
| Http Code | Description | Response type | Response Content | 
|---|---|---|---|
| 200 | Success | application/json | Site | 
| 403 | Authentication Error | application/json | Error | 
| 404 | Not Found |  |  | 
| 500 | Internal Server Error | application/json | Error | 
| 503 | Service Unavailable |  |  | 
Examples
UPDATE
Parameters
| Name | In | Type | Nullable | Translatable | Default | Constraints | 
|---|---|---|---|---|---|---|
| address | Body | string |  |  | null | Max length: 255 | 
| city | Body | string |  |  | null | Max length: 255 | 
| client_id | Body | string |  |  | null | Max length: 255 | 
| cp | Body | string |  |  | null | Max length: 255 | 
| description | Body | string |  |  | null | |
| direction | Body | string |  |  | null | |
| Body | string |  |  | null | Max length: 255 | |
| gps_positions | Body | array |  |  | null | |
| gps_positions[] | Body | object |  |  |  | |
| gps_positions[].altitude | Body | float |  |  |  | |
| gps_positions[].longitude | Body | float |  |  |  | |
| gps_positions[].latitude | Body | float |  |  |  | |
| gps_positions[].x | Body | float |  |  |  | |
| gps_positions[].y | Body | float |  |  |  | |
| gps_positions[].z | Body | float |  |  |  | |
| gps_transform | Body | array |  |  | null | Count: 6 | 
| gps_transform[] | Body | float |  |  |  | |
| gps_translate | Body | array |  |  | null | Count: 3 | 
| gps_translate[] | Body | float |  |  |  | |
| languages | Body | array |  |  | [] | |
| languages[] | Body | string |  |  |  | |
| locale | Body | string |  |  | null | |
| logo | Body | File#id |  |  | null | File must exists | 
| metadata | Body | array |  |  | [] | |
| metadata[] | Body | object |  |  |  | |
| metadata[].key | Body | string |  |  |  | |
| metadata[].type | Body | string |  |  |  | |
| metadata[].value | Body | mixed |  |  |  | |
| name | Body | string |  |  |  | Max length: 255 | 
| opening | Body | string |  |  | null | |
| phone | Body | string |  |  | null | Max length: 255 | 
| signature | Body | string |  |  | null | Max length: 255 | 
| target_platforms | Body | array |  |  | [] | |
| target_platforms[] | Body | string |  |  |  | Choice: "web", "kiosk", "mobile" | 
Responses
| Http Code | Description | Response type | Response Content | 
|---|---|---|---|
| 200 | Success | application/json | Site | 
| 400 | Invalid data | application/json | Error | 
| 403 | Authentication Error | application/json | Error | 
| 404 | Not Found |  |  | 
| 500 | Internal Server Error | application/json | Error | 
| 503 | Service Unavailable |  |  | 
