http://cashbox.mydutyfree.xyz/api/login
>Method: POST
Request
header > access-key:[access-key] username:[username] password:[password]
Response
success{ "status": "success", "message": "", "data": { "auth_key": "[auth_key]", "locale": "ru" } }fail
{ "status": "fail", "message": "These credentials do not match our records.", "data": null }error
{ "status": "error", "message": "Authorization's error.", "data": null }
http://cashbox.mydutyfree.xyz/api/status-list
>Method: GET
Request
header > auth-key:[auth-key] header > access-key:[access-key]
Response
success{ "status": "success", "message": "", "data": [ { "name": "Все Актуальные (414)", "status": "all" }, { "name": "Новый (359)", "status": "new" }, { "name": "Собран (55)", "status": "collected" }, { "name": "Выполнен (13319)", "status": "completed" }, { "name": "Отменен (4989)", "status": "cancelled" } ] }fail
{ "status": "fail", "message": "", "data": [] }
http://cashbox.mydutyfree.xyz/api/orders
>Method: GET
Request
header > auth-key:[auth-key] header > access-key:[access-key] offset:[offset] limit:[limit] status:[status]
Response
success{ "status": "success", "message": "", "data": [ { "status": "collected", "order_id": 38492, "customer_name": "Portna Kateryna", "departure_date": "05 ноября 22:15", "is_today": false, "can_cancelled": true, "created_at": "07 ноября 18:44", "price": "€78.20", "amount": "78.20", "discount_title": "-15% MasterCard", "barcode": "9010000255127", "time_warning": "Создан 1 час 6 минут назад", "products": [ { "product_id": 1575, "is_obtainable": 1, "is_refused": 0, "image": "https://pictures.mydutyfree.net/images/products/88/31/original/lip-maestro-n-500-blush.8831.jpg", "title": "Armani Lip Maestro N° 500 Blush 7ml", "sku": "1007596", "price": "€28.80", "quantity": 1, "images": { "small": "https://pictures.mydutyfree.net/images/products/75/86/50x50/the-one-for-men-eau-de-parfum.7586.jpg", "big": "https://pictures.mydutyfree.net/images/products/75/86/525x525/the-one-for-men-eau-de-parfum.7586.jpg" } }, { "product_id": 10972, "is_obtainable": 1, "is_refused": 0, "image": "https://pictures.mydutyfree.net/images/products/67/97/original/artdeco-perfect-teint-concealer-n03-refreshing-rose.6797.jpg", "title": "Artdeco Perfect Teint Concealer N03 Refreshing Rose 9ml", "sku": "107954", "price": "€10.80", "quantity": 1, "images": { "small": "https://pictures.mydutyfree.net/images/products/75/86/50x50/the-one-for-men-eau-de-parfum.7586.jpg", "big": "https://pictures.mydutyfree.net/images/products/75/86/525x525/the-one-for-men-eau-de-parfum.7586.jpg" } } ], "comments": [ { "user_id": 7, "author": "manager", "created_at": "2018-09-21 14:03:17", "message": "арт.107954 - отказ" } ] }, { "status": "collected", "order_id": 38483, "customer_name": "Alina Borzakovska", "departure_date": "Сегодня 22:15", "is_today": false, "can_cancelled": true, "created_at": "07 ноября 18:44", "price": "€78.20", "amount": "78.20", "discount_title": "-15% MasterCard", "barcode": "9010000208222", "time_warning": "Создан 1 час 6 минут назад", "products": [ { "product_id": 1331, "is_obtainable": 1, "is_refused": 0, "image": "https://pictures.mydutyfree.net/images/products/17/96/original/manifesto-lelixir.1796.jpg", "title": "Yves Saint Laurent Manifesto l'Elixir EdP 50ml", "sku": "1047966", "price": "€66.60", "quantity": 1, "images": { "small": "https://pictures.mydutyfree.net/images/products/75/86/50x50/the-one-for-men-eau-de-parfum.7586.jpg", "big": "https://pictures.mydutyfree.net/images/products/75/86/525x525/the-one-for-men-eau-de-parfum.7586.jpg" } } ], "comments": [] } ] }
http://cashbox.mydutyfree.xyz/api/order/{id}
>Method: GET
Request
header > auth-key:[auth-key] header > access-key:[access-key]
Response
success{ "status": "success", "message": "", "data": { "status": "collected", "order_id": 38492, "customer_name": "Portna Kateryna", "departure_date": "05 ноября 22:15", "is_today": false, "can_cancelled": true, "created_at": "07 ноября 18:44", "price": "€78.20", "amount": "78.20", "discount_title": "-15% MasterCard", "barcode": "9010000255127", "time_warning": "Создан 1 час 6 минут назад", "products": [ { "product_id": 1575, "is_obtainable": 1, "is_refused": 0, "image": "https://pictures.mydutyfree.net/images/products/88/31/original/lip-maestro-n-500-blush.8831.jpg", "title": "Armani Lip Maestro N° 500 Blush 7ml", "sku": "1007596", "price": "€28.80", "quantity": 1, "images": { "small": "https://pictures.mydutyfree.net/images/products/75/86/50x50/the-one-for-men-eau-de-parfum.7586.jpg", "big": "https://pictures.mydutyfree.net/images/products/75/86/525x525/the-one-for-men-eau-de-parfum.7586.jpg" } }, { "product_id": 10972, "is_obtainable": 1, "is_refused": 0, "image": "https://pictures.mydutyfree.net/images/products/67/97/original/artdeco-perfect-teint-concealer-n03-refreshing-rose.6797.jpg", "title": "Artdeco Perfect Teint Concealer N03 Refreshing Rose 9ml", "sku": "107954", "price": "€10.80", "quantity": 1, "images": { "small": "https://pictures.mydutyfree.net/images/products/75/86/50x50/the-one-for-men-eau-de-parfum.7586.jpg", "big": "https://pictures.mydutyfree.net/images/products/75/86/525x525/the-one-for-men-eau-de-parfum.7586.jpg" } } ], "comments": [ { "user_id": 7, "author": "manager", "created_at": "05 ноября 22:15", "message": "арт.107954 - отказ" } ] } }fail
{ "status": "fail", "message": "Заказ не найден.", "data": [] }
http://cashbox.mydutyfree.xyz/api/add-comment
>Method: POST
Request
header > auth-key:[auth-key] header > access-key:[access-key] order_id:[order_id] message:[message]
Response
success{ "status": "success", "message": "Комментарий добавлен.", "data": [ { "user_id": 5, "author": "kievadmin", "created_at": "Сегодня 13:35", "message": "test test" }, { "user_id": 5, "author": "kievadmin", "created_at": "Сегодня 13:35", "message": "test test" }, { "user_id": 5, "author": "kievadmin", "created_at": "Сегодня 14:56", "message": "test test" } ] }fail
{ "status": "fail", "message": "Количество символов в поле message не может превышать 512.", "data": [] }error
{ "status": "error", "message": "Комментарий не добавлен.", "data": [] }
http://cashbox.mydutyfree.xyz/api/get-orders-pdf
>Method: GET
Request
header > auth-key:[auth-key] header > access-key:[access-key] orders_ids:[orders_ids[]] // '43310,4,..' sort:[sort] // (int) 1/0
Response
success{ "status": "success", "message": "", "data": "https://cp.mydutyfree.net/orders/18/4640dd07c7fb0582a9075b5d27133318.pdf" }error
{ "status": "error", "message": "Order not found!", "data": "" }
http://cashbox.mydutyfree.xyz/api/get-cancel-reasons
>Method: GET
Request
header > auth-key:[auth-key] header > access-key:[access-key]
Response
success{ "status": "success", "message": "", "data": [ { "id": 1, "reason": "Client didn't come for the package" }, { "id": 2, "reason": "Order mistakenly duplicated" }, { "id": 3, "reason": "Client flies domestically" }, { "id": 4, "reason": "Client refused to pick up the order" }, { "id": 6, "reason": "Another reason" } ] }
http://cashbox.mydutyfree.xyz/api/set-status
>Method: POST
Request
header > auth-key:[auth-key] header > access-key:[access-key] order_id:[order_id] // (int) 43310 status:[status] // (string) 'collected' reason_code:[reason_code] // (int|null) 1 reason_text:[reason_text] // (string|null) 'reason'
Response
success{ "status": "success", "message": "Status updated", "data": { "status": "cancelled", "order_id": 44015, "customer_name": "Ervin Akema", "departure_date": "16 ноября 12:50", "is_today": false, "can_cancelled": true, "created_at": "07 ноября 18:44", "price": "€78.20", "amount": "78.20", "discount_title": "-15% MasterCard", "barcode": "9010000219013", "time_warning": "Создан 1 час 6 минут назад", "products": [ { "product_id": 556, "is_obtainable": 1, "is_refused": 0, "image": "https://pictures.mydutyfree.net/images/products/01/50/525x525/black-velvet-reserve-8-yo-whisky.0150.jpg", "title": "Black Velvet Reserve 8 YO Whisky 1L", "sku": "681659", "price": "€12.60", "quantity": 2, "images": { "small": "https://pictures.mydutyfree.net/images/products/75/86/50x50/the-one-for-men-eau-de-parfum.7586.jpg", "big": "https://pictures.mydutyfree.net/images/products/75/86/525x525/the-one-for-men-eau-de-parfum.7586.jpg" } }, { "product_id": 565, "is_obtainable": 1, "is_refused": 0, "image": "https://pictures.mydutyfree.net/images/products/20/35/525x525/bombay-sapphire-47-gin.2035.jpg", "title": "Bombay Sapphire 47% Gin 1L", "sku": "858188", "price": "€17.00", "quantity": 1, "images": { "small": "https://pictures.mydutyfree.net/images/products/75/86/50x50/the-one-for-men-eau-de-parfum.7586.jpg", "big": "https://pictures.mydutyfree.net/images/products/75/86/525x525/the-one-for-men-eau-de-parfum.7586.jpg" } } ], "comments": [] } }fail
{ "status": "fail", "message": "Wrong status", "data": null }error
{ "status": "error", "message": "error message", "data": null }
http://cashbox.mydutyfree.xyz/api/set-quantity
>Method: POST
Request
header > auth-key:[auth-key] header > access-key:[access-key] order_id:[order_id] // (int) 43310 product_id:[product_id] // (int) 161 quantity:[quantity] // (int) 2
Response
success{ "status": "success", "message": "Order updated", "data": { "status": "new", "order_id": 44016, "customer_name": "Максим Лозянко", "departure_date": "23 ноября 08:00", "is_today": false, "can_cancelled": true, "created_at": "10 ноября 18:51", "price": "€14.45", "amount": "14.45", "discount_title": "", "barcode": "9015000052981", "time_warning": "Создан 1 час 6 минут назад", "products": [ { "product_id": 241, "is_obtainable": 1, "is_refused": 0, "image": "https://pictures.mydutyfree.net/images/products/96/44/525x525/sierra-tequila-silver.9644.jpg", "title": "Sierra Tequila Silver 1L", "sku": "23222", "price": "€14.45", "quantity": 1, "images": { "small": "https://pictures.mydutyfree.net/images/products/75/86/50x50/the-one-for-men-eau-de-parfum.7586.jpg", "big": "https://pictures.mydutyfree.net/images/products/75/86/525x525/the-one-for-men-eau-de-parfum.7586.jpg" } } ], "comments": [] } }fail
{ "status": "fail", "message": "This product not found in order!", "data": null }error
{ "status": "error", "message": "error message", "data": null }
http://cashbox.mydutyfree.xyz/api/out-of-stock
>Method: POST
Request
header > auth-key:[auth-key] header > access-key:[access-key] order_id:[order_id] // (int) 43310 product_id:[product_id] // (int) 161 is_obtainable:[is_obtainable] // (bool) false // if true -> made in stock
Response
success{ "status": "success", "message": "User notified", "data": { "status": "new", "order_id": 44016, "customer_name": "Максим Лозянко", "departure_date": "23 ноября 08:00", "is_today": false, "can_cancelled": true, "created_at": "10 ноября 18:51", "price": "€14.45", "amount": "14.45", "discount_title": "", "barcode": "9015000052981", "time_warning": "Создан 1 час 6 минут назад", "products": [ { "product_id": 241, "is_obtainable": 1, "is_refused": 0, "image": "https://pictures.mydutyfree.net/images/products/96/44/525x525/sierra-tequila-silver.9644.jpg", "title": "Sierra Tequila Silver 1L", "sku": "23222", "price": "€14.45", "quantity": 1, "images": { "small": "https://pictures.mydutyfree.net/images/products/75/86/50x50/the-one-for-men-eau-de-parfum.7586.jpg", "big": "https://pictures.mydutyfree.net/images/products/75/86/525x525/the-one-for-men-eau-de-parfum.7586.jpg" } } ], "comments": [] } }fail
{ "status": "fail", "message": "This product not found in order!", "data": null }error
{ "status": "error", "message": "error message", "data": null }
http://cashbox.mydutyfree.xyz/api/product-refused
>Method: POST
Request
header > auth-key:[auth-key] header > access-key:[access-key] order_id:[order_id] // (int) 43310 product_id:[product_id] // (int) 161 is_refused:[is_refused] // (bool) 1/0
Response
success{ "status": "success", "message": "Order updated", "data": { "status": "cancelled", "order_id": 44015, "customer_name": "Ervin Akema", "departure_date": "23 ноября 12:50", "is_today": false, "can_cancelled": true, "created_at": "08 ноября 16:34", "price": "€17.00", "amount": "17.00", "discount_title": "", "barcode": "9010000219013", "time_warning": "Создан 1 час 6 минут назад", "products": [ { "product_id": 565, "is_obtainable": 1, "is_refused": 0, "image": "https://pictures.mydutyfree.net/images/products/20/35/525x525/bombay-sapphire-47-gin.2035.jpg", "title": "Bombay Sapphire 47% Gin 1L", "sku": "858188", "price": "€17.00", "quantity": 1, "images": { "small": "https://pictures.mydutyfree.net/images/products/75/86/50x50/the-one-for-men-eau-de-parfum.7586.jpg", "big": "https://pictures.mydutyfree.net/images/products/75/86/525x525/the-one-for-men-eau-de-parfum.7586.jpg" } } ], "comments": [ { "user_id": 5, "author": "kievadmin", "created_at": "22 ноября 15:20", "message": "Валерий" } ] } }fail
{ "status": "fail", "message": "This product not found in order!", "data": null }error
{ "status": "error", "message": "error message", "data": null }