{ "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "http", "https" ], "swagger": "2.0", "info": { "title": "etop API", "version": "v1" }, "paths": { "/v1/shop.History/GetChanges": { "post": { "tags": [ "History" ], "operationId": "GetChanges", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/oyGetChangesRequest" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/oyCallback" } } } } }, "/v1/shop.Misc/CurrentAccount": { "post": { "tags": [ "Misc" ], "operationId": "CurrentAccount", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/maEmpty" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/ocPublicAccountInfo" } } } } }, "/v1/shop.Misc/GetLocationList": { "post": { "tags": [ "Misc" ], "operationId": "GetLocationList", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/maEmpty" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/oyLocationResponse" } } } } }, "/v1/shop.Misc/VersionInfo": { "post": { "tags": [ "Misc" ], "operationId": "VersionInfo", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/maEmpty" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/maVersionInfoResponse" } } } } }, "/v1/shop.Shipping/CancelOrder": { "post": { "tags": [ "Shipping" ], "operationId": "CancelOrder", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/oyCancelOrderRequest" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/oyOrderAndFulfillments" } } } } }, "/v1/shop.Shipping/CreateAndConfirmOrder": { "post": { "tags": [ "Shipping" ], "operationId": "CreateAndConfirmOrder", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/oyCreateOrderRequest" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/oyOrderAndFulfillments" } } } } }, "/v1/shop.Shipping/GetFulfillment": { "post": { "tags": [ "Shipping" ], "operationId": "GetFulfillment", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/oyFulfillmentIDRequest" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/oyFulfillment" } } } } }, "/v1/shop.Shipping/GetOrder": { "post": { "tags": [ "Shipping" ], "operationId": "GetOrder", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/oyOrderIDRequest" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/oyOrderAndFulfillments" } } } } }, "/v1/shop.Shipping/GetShippingServices": { "post": { "tags": [ "Shipping" ], "operationId": "GetShippingServices", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/oyGetShippingServicesRequest" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/oyGetShippingServicesResponse" } } } } }, "/v1/shop.Webhook/CreateWebhook": { "post": { "tags": [ "Webhook" ], "operationId": "CreateWebhook", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/oyCreateWebhookRequest" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/oyWebhook" } } } } }, "/v1/shop.Webhook/DeleteWebhook": { "post": { "tags": [ "Webhook" ], "operationId": "DeleteWebhook", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/oyDeleteWebhookRequest" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/oyWebhooksResponse" } } } } }, "/v1/shop.Webhook/GetWebhooks": { "post": { "tags": [ "Webhook" ], "operationId": "GetWebhooks", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/maEmpty" } } ], "responses": { "200": { "description": "A successful response", "schema": { "$ref": "#/definitions/oyWebhooksResponse" } } } } } }, "definitions": { "juFeeType": { "type": "string", "enum": [ "other", "shipping", "tax" ] }, "maEmpty": { "type": "object" }, "maError": { "type": "object", "properties": { "code": { "type": "string" }, "meta": { "type": "object", "additionalProperties": { "type": "string" } }, "msg": { "type": "string" } } }, "maForwardPaging": { "type": "object", "properties": { "limit": { "type": "integer" }, "since": { "type": "string" } } }, "maVersionInfoResponse": { "type": "object", "properties": { "service": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" }, "version": { "type": "string" } } }, "nqState": { "type": "string", "enum": [ "cancelled", "confirmed", "created", "default", "delivered", "delivering", "holding", "picking", "processing", "returned", "returning", "undeliverable", "unknown" ] }, "ocAccountType": { "type": "string", "enum": [ "affiliate", "etop", "partner", "shop", "unknown" ] }, "ocPublicAccountInfo": { "type": "object", "properties": { "id": { "type": "string", "format": "int64" }, "image_url": { "type": "string" }, "name": { "type": "string" }, "type": { "$ref": "#/definitions/ocAccountType" }, "website": { "type": "string" } } }, "oyCallback": { "type": "object", "properties": { "changes": { "type": "array", "items": { "$ref": "#/definitions/oyChange" } }, "id": { "type": "string", "format": "int64" } } }, "oyCancelOrderRequest": { "type": "object", "properties": { "cancel_reason": { "type": "string" }, "code": { "type": "string" }, "external_id": { "type": "string" }, "id": { "type": "string", "format": "int64" } } }, "oyChange": { "type": "object", "properties": { "change_type": { "type": "string" }, "changed": { "$ref": "#/definitions/oyChangeOneOf" }, "entity": { "type": "string" }, "latest": { "$ref": "#/definitions/oyLatestOneOf" }, "time": { "type": "string", "format": "date-time" } } }, "oyChangeOneOf": { "type": "object", "properties": { "fulfillment": { "$ref": "#/definitions/oyFulfillment" }, "order": { "$ref": "#/definitions/oyOrder" } } }, "oyCreateOrderRequest": { "type": "object", "properties": { "basket_value": { "type": "integer" }, "customer_address": { "$ref": "#/definitions/oyOrderAddress" }, "external_code": { "type": "string" }, "external_id": { "type": "string" }, "external_meta": { "type": "object", "additionalProperties": { "type": "string" } }, "external_url": { "type": "string" }, "fee_lines": { "type": "array", "items": { "$ref": "#/definitions/vmOrderFeeLine" } }, "lines": { "type": "array", "items": { "$ref": "#/definitions/oyOrderLine" } }, "order_discount": { "type": "integer" }, "order_note": { "type": "string" }, "shipping": { "$ref": "#/definitions/oyOrderShipping" }, "shipping_address": { "$ref": "#/definitions/oyOrderAddress" }, "total_amount": { "type": "integer" }, "total_discount": { "type": "integer" }, "total_fee": { "type": "integer" }, "total_items": { "type": "integer" } } }, "oyCreateWebhookRequest": { "type": "object", "properties": { "entities": { "type": "array", "items": { "type": "string" } }, "fields": { "type": "array", "items": { "type": "string" } }, "metadata": { "type": "string" }, "url": { "type": "string" } } }, "oyDeleteWebhookRequest": { "type": "object", "properties": { "id": { "type": "string", "format": "int64" } } }, "oyDistrict": { "type": "object", "properties": { "name": { "type": "string" }, "wards": { "type": "array", "items": { "$ref": "#/definitions/oyWard" } } } }, "oyFulfillment": { "type": "object", "properties": { "actual_cod_amount": { "type": "integer" }, "actual_shipping_service_fee": { "type": "integer" }, "basket_value": { "type": "integer" }, "cancel_reason": { "type": "string" }, "cancelled_at": { "type": "string", "format": "date-time" }, "carrier": { "$ref": "#/definitions/whShippingProvider" }, "chargeable_weight": { "type": "integer" }, "closed_at": { "type": "string", "format": "date-time" }, "cod_amount": { "type": "integer" }, "confirm_status": { "$ref": "#/definitions/wwStatus" }, "created_at": { "type": "string", "format": "date-time" }, "estimated_delivery_at": { "type": "string", "format": "date-time" }, "estimated_pickup_at": { "type": "string", "format": "date-time" }, "etop_payment_status": { "$ref": "#/definitions/wxStatus" }, "id": { "type": "string", "format": "int64" }, "include_insurance": { "type": "boolean" }, "order_id": { "type": "string", "format": "int64" }, "pickup_address": { "$ref": "#/definitions/oyOrderAddress" }, "return_address": { "$ref": "#/definitions/oyOrderAddress" }, "self_url": { "type": "string" }, "shipping_address": { "$ref": "#/definitions/oyOrderAddress" }, "shipping_code": { "type": "string" }, "shipping_note": { "type": "string" }, "shipping_service_code": { "type": "string" }, "shipping_service_fee": { "type": "integer" }, "shipping_service_name": { "type": "string" }, "shipping_state": { "$ref": "#/definitions/nqState" }, "shipping_status": { "$ref": "#/definitions/wyStatus" }, "shop_id": { "type": "string", "format": "int64" }, "status": { "$ref": "#/definitions/wyStatus" }, "total_items": { "type": "integer" }, "try_on": { "$ref": "#/definitions/xdTryOnCode" }, "updated_at": { "type": "string", "format": "date-time" } } }, "oyFulfillmentIDRequest": { "type": "object", "properties": { "id": { "type": "string", "format": "int64" }, "shipping_code": { "type": "string" } } }, "oyGetChangesRequest": { "type": "object", "properties": { "entity": { "type": "string" }, "entity_id": { "type": "string" }, "paging": { "$ref": "#/definitions/maForwardPaging" } } }, "oyGetShippingServicesRequest": { "type": "object", "properties": { "basket_value": { "type": "integer" }, "chargeable_weight": { "type": "integer" }, "cod_amount": { "type": "integer" }, "gross_weight": { "type": "integer" }, "height": { "type": "integer" }, "include_insurance": { "type": "boolean" }, "length": { "type": "integer" }, "pickup_address": { "$ref": "#/definitions/oyLocationAddress" }, "shipping_address": { "$ref": "#/definitions/oyLocationAddress" }, "width": { "type": "integer" } } }, "oyGetShippingServicesResponse": { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/definitions/oyShippingService" } } } }, "oyLatestOneOf": { "type": "object", "properties": { "fulfillment": { "$ref": "#/definitions/oyFulfillment" }, "order": { "$ref": "#/definitions/oyOrder" } } }, "oyLocationAddress": { "type": "object", "properties": { "district": { "type": "string" }, "province": { "type": "string" } } }, "oyLocationResponse": { "type": "object", "properties": { "provinces": { "type": "array", "items": { "$ref": "#/definitions/oyProvince" } } } }, "oyOrder": { "type": "object", "properties": { "basket_value": { "type": "integer" }, "cancel_reason": { "type": "string" }, "cancelled_at": { "type": "string", "format": "date-time" }, "closed_at": { "type": "string", "format": "date-time" }, "code": { "type": "string" }, "confirm_status": { "$ref": "#/definitions/wwStatus" }, "confirmed_at": { "type": "string", "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "customer_address": { "$ref": "#/definitions/oyOrderAddress" }, "etop_payment_status": { "$ref": "#/definitions/wxStatus" }, "external_code": { "type": "string" }, "external_id": { "type": "string" }, "external_url": { "type": "string" }, "fee_lines": { "type": "array", "items": { "$ref": "#/definitions/vmOrderFeeLine" } }, "fulfillment_shipping_status": { "$ref": "#/definitions/wyStatus" }, "id": { "type": "string", "format": "int64" }, "lines": { "type": "array", "items": { "$ref": "#/definitions/oyOrderLine" } }, "order_discount": { "type": "integer" }, "order_note": { "type": "string" }, "processed_at": { "type": "string", "format": "date-time" }, "self_url": { "type": "string" }, "shipping": { "$ref": "#/definitions/oyOrderShipping" }, "shipping_address": { "$ref": "#/definitions/oyOrderAddress" }, "shop_id": { "type": "string", "format": "int64" }, "status": { "$ref": "#/definitions/wyStatus" }, "total_amount": { "type": "integer" }, "total_discount": { "type": "integer" }, "total_fee": { "type": "integer" }, "total_items": { "type": "integer" }, "updated_at": { "type": "string", "format": "date-time" } } }, "oyOrderAddress": { "type": "object", "properties": { "address1": { "type": "string" }, "address2": { "type": "string" }, "company": { "type": "string" }, "district": { "type": "string" }, "email": { "type": "string" }, "full_name": { "type": "string" }, "phone": { "type": "string" }, "province": { "type": "string" }, "ward": { "type": "string" } } }, "oyOrderAndFulfillments": { "type": "object", "properties": { "fulfillment_errors": { "type": "array", "items": { "$ref": "#/definitions/maError" } }, "fulfillments": { "type": "array", "items": { "$ref": "#/definitions/oyFulfillment" } }, "order": { "$ref": "#/definitions/oyOrder" } } }, "oyOrderIDRequest": { "type": "object", "properties": { "code": { "type": "string" }, "external_id": { "type": "string" }, "id": { "type": "string", "format": "int64" } } }, "oyOrderLine": { "type": "object", "properties": { "attributes": { "type": "array", "items": { "$ref": "#/definitions/vmAttribute" } }, "image_url": { "type": "string" }, "list_price": { "type": "integer" }, "payment_price": { "type": "integer" }, "product_id": { "type": "string", "format": "int64" }, "product_name": { "type": "string" }, "quantity": { "type": "integer" }, "retail_price": { "type": "integer" }, "variant_id": { "type": "string", "format": "int64" } } }, "oyOrderShipping": { "type": "object", "properties": { "carrier": { "$ref": "#/definitions/whShippingProvider" }, "chargeable_weight": { "type": "integer" }, "cod_amount": { "type": "integer" }, "gross_weight": { "type": "integer" }, "height": { "type": "integer" }, "include_insurance": { "type": "boolean" }, "length": { "type": "integer" }, "pickup_address": { "$ref": "#/definitions/oyOrderAddress" }, "return_address": { "$ref": "#/definitions/oyOrderAddress" }, "shipping_note": { "type": "string" }, "shipping_service_code": { "type": "string" }, "shipping_service_fee": { "type": "integer" }, "shipping_service_name": { "type": "string" }, "try_on": { "$ref": "#/definitions/xdTryOnCode" }, "width": { "type": "integer" } } }, "oyProvince": { "type": "object", "properties": { "districts": { "type": "array", "items": { "$ref": "#/definitions/oyDistrict" } }, "name": { "type": "string" } } }, "oyShippingService": { "type": "object", "properties": { "carrier": { "$ref": "#/definitions/whShippingProvider" }, "code": { "type": "string" }, "estimated_delivery_at": { "type": "string", "format": "date-time" }, "estimated_pickup_at": { "type": "string", "format": "date-time" }, "fee": { "type": "integer" }, "name": { "type": "string" } } }, "oyWard": { "type": "object", "properties": { "name": { "type": "string" } } }, "oyWebhook": { "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time" }, "entities": { "type": "array", "items": { "type": "string" } }, "fields": { "type": "array", "items": { "type": "string" } }, "id": { "type": "string", "format": "int64" }, "metadata": { "type": "string" }, "states": { "$ref": "#/definitions/oyWebhookStates" }, "url": { "type": "string" } } }, "oyWebhookError": { "type": "object", "properties": { "error": { "type": "string" }, "resp_body": { "type": "string" }, "resp_status": { "type": "integer" }, "retried": { "type": "integer" }, "sent_at": { "type": "string", "format": "date-time" } } }, "oyWebhookStates": { "type": "object", "properties": { "last_error": { "$ref": "#/definitions/oyWebhookError" }, "last_sent_at": { "type": "string", "format": "date-time" }, "state": { "type": "string" } } }, "oyWebhooksResponse": { "type": "object", "properties": { "webhooks": { "type": "array", "items": { "$ref": "#/definitions/oyWebhook" } } } }, "vmAttribute": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } } }, "vmOrderFeeLine": { "type": "object", "properties": { "amount": { "type": "integer" }, "code": { "type": "string" }, "desc": { "type": "string" }, "name": { "type": "string" }, "type": { "$ref": "#/definitions/juFeeType" } } }, "whShippingProvider": { "type": "string", "enum": [ "all", "ghn", "ghtk", "manual", "unknown", "vtpost" ] }, "wwStatus": { "type": "string", "enum": [ "N", "P", "Z" ] }, "wxStatus": { "type": "string", "enum": [ "N", "P", "S", "Z" ] }, "wyStatus": { "type": "string", "enum": [ "N", "NS", "P", "S", "Z" ] }, "xdTryOnCode": { "type": "string", "enum": [ "none", "open", "try", "unknown" ] } }, "tags": [ { "name": "History" }, { "name": "Misc" }, { "name": "Shipping" }, { "name": "Webhook" } ] }