Language
Retrieve the available languages of a shop.
Example Object
{
"language": {
"id": 18,
"isActive": true,
"isDefault": true,
"code": "us",
"locale": "en_US",
"title": "English (US)"
}
}
Properties
id | The unique numeric identifier for the language. {“id”: {id}} |
isActive | Is the language enabled. (format: boolean){“isActive”: “false|true”} |
isDefault | The language that is set as default. (format: boolean){“isDefault”: “false|true”} |
code | Two letter code representing the language. (format: ISO 639-1){“code”: “us”} |
locale | Two two letter codes seperated by a underscore. (format: RFC 1766 - ISO 639){“locale”: “en_US”} |
title | Title of the language. {“title”: “English (US)”} |
GET All languages
Retrieve a list of all language objects from this shop.
Definition
GET /languages.json
Example Request
curl https://api.shoplightspeed.com/en/languages.json \
-u {key}:{secret}
<?php $api->languages->get();
Example Response
{
"languages": [
{
"id": 19,
"isActive": true,
"isDefault": false,
"code": "fc",
"locale": "fr_CA",
"title": "Français (CA)"
},
{
"id": 18,
"isActive": true,
"isDefault": true,
"code": "us",
"locale": "en_US",
"title": "English (US)"
}
]
}
ARGUMENTS
No arguments available. |
Filters
limit | Number of results. {(default: 50) (maximum: 250)} |
page | Page to show. {(default: 1)} |
since_id | Restrict results to after the specified ID. {(default: 0)} |
created_at_min | Show languages created after date. {(format: YYYY-MM-DD HH:MM:SS)} |
created_at_max | Show languages created before date. {(format: YYYY-MM-DD HH:MM:SS)} |
GET Number of languages
Retrieve the total number of language objects from this shop.
Definition
GET /languages/count.json
Example Request
curl https://api.shoplightspeed.com/en/languages/count.json \
-u {key}:{secret}
<?php $api->languages->count();
Example Response
{
"count": 2
}
ARGUMENTS
No arguments available. |
Filters
limit | Number of results. {(default: 50) (maximum: 250)} |
page | Page to show. {(default: 1)} |
since_id | Restrict results to after the specified ID. {(default: 0)} |
created_at_min | Show languages created after date. {(format: YYYY-MM-DD HH:MM:SS)} |
created_at_max | Show languages created before date. {(format: YYYY-MM-DD HH:MM:SS)} |
GET Retrieve a language
Retrieve a single languages object based on the unique identifier.
Definition
GET /languages/{language_id}.json
Example Request
curl https://api.shoplightspeed.com/en/languages/{language_id}.json \
-u {key}:{secret}
<?php $api->languages->get($language_id);
Example Response
{
"language": {
"id": 18,
"isActive": true,
"isDefault": true,
"code": "us",
"locale": "en_US",
"title": "English"
}
}
Arguments
id | The unique numeric identifier for the language. {“id”: {id}} |