Augment: RESTFULL API Documentation
API Example Description
Authentication ¶
The Augment RESTFULL API use the Oauth process for authentication. You need to have a ‘integration ID’ and an ‘integration secret’
Generate new Token ¶
cURL
curl "https://webservice.augment.com/rest/v1/oauth/token" \
-d '{\
"grant_type":"password",\
"client_id":"my_integration_id",\
"client_secret":"my_integration_secret",\
"username":"my_username",\
"password":"my_password"\
}' \
-X POST \
-H "Content-Type: application/json" \
-H "Host: example.org"
```
Headers
Content-Type: application/json
Host: example.org
Body
{
"grant_type": "password",
"client_id": "my_integration_id",
"client_secret": "my_integration_secret",
"username": "my_username",
"password": "my_password"
}
Headers
Content-Type: application/json
Body
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6NSwiZXhwaXJlc19hdCI6IjIwMTctMTAtMTggMTI6MTY6NTYgVVRDIn0.H3gU1tUhNYbRVapBgdVYHqouS9MUO-wP2P3Wwwelw7g",
"token_type": "bearer",
"expires_in": 7200,
"scope": "public",
"created_at": 1508321816
}
Headers
Content-Type: application/json
Body
{
"error": {
"status": "unauthorized",
"code": 401,
"title": "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."
}
}
CreatePOST/rest/v1/oauth/token
Data:
-
grant_type (required) - The client credentials
-
client_id (required) - Your integration id
-
client_secret (required) - Your integration secret
-
username (required) - Your username
-
password (required) - Your password
Revoke the given Token ¶
cURL
curl "https://webservice.augment.com/rest/v1/oauth/token" \
-d '{\
"grant_type":"client_credentials",\
"client_id":"my_integration_id",\
"client_secret":"my_integration_secret",\
"username":"my_username",\
"password":"my_password"\
}' \
-X DELETE \
-H "Content-Type: application/json" \
-H "Host: example.org"
```
Headers
Content-Type: application/json
Host: example.org
Body
{
"grant_type": "client_credentials",
"client_id": "my_integration_id",
"client_secret": "my_integration_secret",
"username":"my_username",
"password":"my_password",
}
Headers
Content-Type: application/json
Body
{}
RevokeDELETE/rest/v1/oauth/token
It always returns an empty body with a 200 status (in the specification)
Data:
-
grant_type (required) - The client credentials
-
client_id (required) - Your integration id
-
client_secret (required) - Your integration secret
-
username (required) - Your username
-
password (required) - Your password
Catalog ¶
Get catalogs details ¶
cURL
curl -g "https://webservice.augment.com/rest/v1/catalogs" \
-X GET \
-H "Content-Type: application/json" \
-H "HTTP_AUTORIZATION: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ" \
-H "Host: example.org"
```
Headers
Content-Type: application/json
Content-Type: application/json
Autorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ
Host: example.org
Headers
Content-Type: application/json
Body
{
"catalogs": [
{
"name": "Catalog 1",
"uuid": "2b11b107-f8b6-4a46-a82a-b95a9f237ccf",
"created_at": "2017-10-18T10:16:56.000Z",
"updated_at": "2017-10-18T10:16:56.000Z"
},
{
"name": "Catalog 2",
"uuid": "c45523c2-585a-4394-8281-746a40f69585",
"created_at": "2017-10-18T10:16:56.000Z",
"updated_at": "2017-10-18T10:16:56.000Z"
}
]
}
ListGET/rest/v1/catalogs
Get catalog Details ¶
cURL
curl -g "https://webservice.augment.com/rest/v1/catalogs/82ac977a-2ef9-456c-9644-0f7ad8417888" \
-X GET \
-H "Content-Type: application/json" \
-H "HTTP_AUTORIZATION: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ" \
-H "Host: example.org"
```
Headers
Content-Type: application/json
Autorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ
Host: example.org
Headers
Content-Type: application/json
Body
{
"catalog": {
"name": "Catalog 1",
"uuid": "82ac977a-2ef9-456c-9644-0f7ad8417888",
"created_at": "2017-10-18T10:16:56.000Z",
"updated_at": "2017-10-18T10:16:56.000Z"
}
}
Headers
Content-Type: application/json
Body
{
"error": {
"status": "not_found",
"code": 404,
"title": "Catalog not found"
}
}
Product ¶
Products ¶
cURL
curl -g "https://webservice.augment.com/rest/v1/catalogs/7c3e811d-3089-4573-bb61-09f9465b9781/products" \
-X GET \
-H "Content-Type: application/json" \
-H "HTTP_AUTORIZATION: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ" \
-H "Host: example.org"
```
Headers
Content-Type: application/json
Autorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ
Host: example.org
Headers
Content-Type: application/json
Body
{
"total": 6,
"total_pages": 1,
"current_page": 1,
"products": [
{
"identifier": "ab123",
"brand": "Brand name",
"name": "Product name",
"page_url": "http://www.myshop.com/product-name",
"category_path": [
"awesome",
"products"
],
"thumbnail_urls": [
"http://www.myshop.com/asset/pict.jpg"
],
"gtin": {
"value": "1234567890123",
"type": "GTIN-13"
},
"price": {
"value": 99.99,
"currency": "EUR"
},
"created_at": "2017-10-18T10:16:57Z",
"updated_at": "2017-10-18T10:16:57Z"
},
//...
{
"identifier": "000020",
"brand": "Brand 20",
"name": "Product Occurence 20",
"page_url": null,
"category_path": [
"Category 24"
],
"thumbnail_urls": [
],
"gtin": {
"value": "0000000000024",
"type": "EAN-13"
},
"price": null,
"created_at": "2017-10-18T10:16:57Z",
"updated_at": "2017-10-18T10:16:57Z"
}
]
}
cURL
curl -g "https://webservice.augment.com/rest/v1/catalogs/7d814fe9-48d4-4c11-b5a1-e287020e9b4a/products" \
per=3&page=2" \
-X GET \
-H "Content-Type: application/json" \
-H "HTTP_AUTORIZATION: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ" \
-H "Host: example.org"
```
Headers
Content-Type: application/json
Autorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ
Host: example.org
Headers
Content-Type: application/json
Body
{
"total": 6,
"total_pages": 2,
"current_page": 2,
"products": [
{
"identifier": "000023",
"brand": "Brand 23",
"name": "Product Occurence 23",
"page_url": null,
"category_path": [
"Category 28"
],
"thumbnail_urls": [
],
"gtin": {
"value": "0000000000028",
"type": "EAN-13"
},
"price": null,
"created_at": "2017-10-18T10:16:57Z",
"updated_at": "2017-10-18T10:16:57Z"
},
//...
{
"identifier": "000025",
"brand": "Brand 25",
"name": "Product Occurence 25",
"page_url": null,
"category_path": [
"Category 30"
],
"thumbnail_urls": [
],
"gtin": {
"value": "0000000000030",
"type": "EAN-13"
},
"price": null,
"created_at": "2017-10-18T10:16:57Z",
"updated_at": "2017-10-18T10:16:57Z"
}
]
}
ListGET/rest/v1/catalogs/{catalog_id}/products{?per,page}
- catalog_id
number
(required)Catalog UUID
- per
number
(optional)number of products per page
- page
number
(optional)
Product ¶
cURL
curl -g "https://webservice.augment.com/rest/v1/catalogs/17e8577f-6d1b-41b5-bbaf-dd708295d299/products/ab123" \
-X GET \
-H "Content-Type: application/json" \
-H "HTTP_AUTORIZATION: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ" \
-H "Host: example.org"
```
Headers
Content-Type: application/json
Autorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ
Host: example.org
Headers
Content-Type: application/json
Body
{
"product": {
"identifier": "ab123",
"brand": "Brand name",
"name": "Product name",
"page_url": "http://www.myshop.com/product-name",
"category_path": [
"awesome",
"products"
],
"thumbnail_urls": [
"http://www.myshop.com/asset/pict.jpg"
],
"gtin": {
"value": "1234567890123",
"type": "GTIN-13"
},
"price": {
"value": 99.99,
"currency": "EUR"
},
"created_at": "2017-10-18T10:16:57Z",
"updated_at": "2017-10-18T10:16:57Z"
}
}
Headers
Content-Type: application/json
Body
{
"error": {
"status": "not_found",
"code": 404,
"title": "Product not found"
}
}
ShowGET/rest/v1/catalogs/{catalog_id}/products/{id}
- catalog_id
number
(required)Catalog UUID
- id
number
(required)Product identifier
Products ¶
cURL
curl "https://webservice.augment.com/rest/v1/catalogs/3083daa4-3f88-4609-b6a6-93849c5c7288/products" \
-d '{"product":\
{\
"identifier":"createdproduct",\
"brand":"Brand name",\
"name":"Product name",\
"page_url":"http://www.myshop.com/product-name",\
"category_path":["awesome","products"],\
"thumbnail_urls":["http://www.myshop.com/asset/pict.jpg"],\
"gtin":{\
"value":"1000000000123",\
"type":"GTIN-13"},\
"price":{\
"value":59,\
"currency":"EUR"\
}\
}\
}' \
-X POST \
-H "Content-Type: application/json" \
-H "Autorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ" \
-H "Host: example.org"
Headers
Content-Type: application/json
Autorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ \
Host: example.org
Body
{
"product": {
"identifier": "createdproduct",
"brand": "Brand name",
"name": "Product name",
"page_url": "http://www.myshop.com/product-name",
"category_path": [
"awesome",
"products"
],
"thumbnail_urls": [
"http://www.myshop.com/asset/pict.jpg"
],
"gtin": {
"value": "1000000000123",
"type": "GTIN-13"
},
"price": {
"value": 59,
"currency": "EUR"
}
}
}
Headers
Content-Type: application/json
Body
{
"product": {
"identifier": "createdproduct",
"brand": "Brand name",
"name": "Product name",
"page_url": "http://www.myshop.com/product-name",
"category_path": [
"awesome",
"products"
],
"thumbnail_urls": [
"http://www.myshop.com/asset/pict.jpg"
],
"gtin": {
"value": "1000000000123",
"type": "GTIN-13"
},
"price": {
"value": 59,
"currency": "EUR"
},
"created_at": "2017-10-18T10:16:57Z",
"updated_at": "2017-10-18T10:16:57Z"
}
}
Headers
Content-Type: application/json
Body
{
"error": {
"status": "bad_request",
"code": 400,
"title": "'identifier' is missing."
}
}
Headers
Content-Type: application/json
Body
{
"error": {
"status": "unprocessable_entity",
"code": 422,
"title": "Product already exists with the identifier."
}
}
CreatePOST/rest/v1/catalogs/{catalog_id}/products
The product identifier is unique and can not be change after create. Body data Structures:
- product
json
(required) - Product object- identifier
string
(required) - Must be unique scoped by catalog - brand
string
(required) - name
sring
(required) - page_url
string
(optional) - category_path
array
(optional) - thumbnail_urls
arrays
(optional) - gtin
json
(optional)- value
string
(required) - type
string
(required) - One of: GTIN-13, GTIN-12, GTIN-8, UPC-A, UPC-E, EAN-13, EAN-8
- value
- price
json
(optional)- value
string
(required) - currency
number
(required)
- value
- identifier
- catalog_id
number
(required)Catalog UUID
Products ¶
cURL
curl "https://webservice.augment.com/rest/v1/catalogs/3083daa4-3f88-4609-b6a6-93849c5c7288/products/ab123" \
-d '{"product":\
{\
"identifier":"ab123",\
"brand":"Brand name",\
"name":"Product name",\
"page_url":"http://www.myshop.com/product-name",\
"category_path":["awesome","products"],\
"thumbnail_urls":["http://www.myshop.com/asset/pict.jpg"],\
"gtin":{\
"value":"1000000000123",\
"type":"GTIN-13"},\
"price":{\
"value":59,\
"currency":"EUR"\
}\
}\
}' \
-X PUT \
-H "Content-Type: application/json" \
-H "Autorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ" \
-H "Host: example.org"
Headers
Content-Type: application/json
Autorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ \
Host: example.org
Body
{
"product": {
"identifier": "ab123",
"brand": "Brand name",
"name": "Product name",
"page_url": "http://www.myshop.com/product-name",
"category_path": [
"awesome",
"products"
],
"thumbnail_urls": [
"http://www.myshop.com/asset/pict.jpg"
],
"gtin": {
"value": "1000000000123",
"type": "GTIN-13"
},
"price": {
"value": 59,
"currency": "EUR"
}
}
}
Headers
Content-Type: application/json
Body
{
"product": {
"identifier": "ab123",
"brand": "Brand name",
"name": "Product name",
"page_url": "http://www.myshop.com/product-name",
"category_path": [
"awesome",
"products"
],
"thumbnail_urls": [
"http://www.myshop.com/asset/pict.jpg"
],
"gtin": {
"value": "1000000000123",
"type": "GTIN-13"
},
"price": {
"value": 59,
"currency": "EUR"
},
"created_at": "2017-10-18T10:16:57Z",
"updated_at": "2017-10-23T08:45:12Z"
}
}
UpdatePUT/rest/v1/catalogs/{catalog_id}/products/{id}
- catalog_id
number
(required)Catalog UUID
- id
number
(required)Product identifier
Products ¶
cURL
curl "https://webservice.augment.com/rest/v1/catalogs/3083daa4-3f88-4609-b6a6-93849c5c7288/products/ab123" \
-X DELETE \
-H "Content-Type: application/json" \
-H "Autorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ" \
-H "Host: example.org"
Headers
Content-Type: application/json
Autorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnRlZ3JhdGlvbl9pZCI6MTAsImV4cGlyZXNfYXQiOiIyMDE3LTEwLTE4IDEyOjE2OjU3IFVUQyJ9.LH7FaSlcOmnQylt5xndneOoZUdYOBIvgYRXQ6MXgmSQ \
Host: example.org
Headers
Content-Type: application/json
Body
{}
DestroyDELETE/rest/v1/catalogs/{catalog_id}/products/{id}
- catalog_id
number
(required)Catalog UUID
- id
number
(required)Product identifier
Generated by aglio on 10 Nov 2017