{ "openapi": "3.0.3", "info": { "title": "SFC Fulfillment API", "version": "3.0.0", "description": "SFC Fulfillment API machine-readable index for product, ASN, order, and utility operations. Human-readable docs: /api/fulfillment-api-v3 (HTML) and /api/fulfillment-api-v3.md (Markdown).", "contact": { "name": "SFC IT Support", "email": "IT_Support@SendFromChina.com", "url": "https://www.sendfromchina.com/contact-us" } }, "servers": [ { "url": "https://fulfill.sendfromchina.com", "description": "SFC Fulfillment API production endpoint" } ], "tags": [ { "name": "Product", "description": "Product and inventory related APIs" }, { "name": "ASN", "description": "Inbound and add-on service APIs" }, { "name": "Order", "description": "Order lifecycle APIs" }, { "name": "Utility", "description": "Country, warehouse, shipping type and support APIs" } ], "security": [ { "ApiKeyAuth": [], "SignatureAuth": [] } ], "paths": { "/v3/products": { "post": { "tags": [ "Product" ], "summary": "Create Product", "operationId": "createProduct", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateProductRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" }, "400": { "$ref": "#/components/responses/ErrorResponse" } } } }, "/v3/products/{productCode}": { "get": { "tags": [ "Product" ], "summary": "Get Product Information", "operationId": "getProduct", "parameters": [ { "$ref": "#/components/parameters/ProductCodeParam" } ], "responses": { "200": { "$ref": "#/components/responses/ProductResponse" }, "404": { "$ref": "#/components/responses/ErrorResponse" } } }, "put": { "tags": [ "Product" ], "summary": "Edit Product", "operationId": "editProduct", "parameters": [ { "$ref": "#/components/parameters/ProductCodeParam" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProductRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" }, "400": { "$ref": "#/components/responses/ErrorResponse" } } } }, "/v3/products/{productCode}/status": { "patch": { "tags": [ "Product" ], "summary": "Edit Product Status", "operationId": "editProductStatus", "parameters": [ { "$ref": "#/components/parameters/ProductCodeParam" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProductStatusRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" }, "400": { "$ref": "#/components/responses/ErrorResponse" } } } }, "/v3/inventory": { "get": { "tags": [ "Product" ], "summary": "Get Inventory Information", "operationId": "getInventory", "parameters": [ { "$ref": "#/components/parameters/PageParam" }, { "$ref": "#/components/parameters/PageSizeParam" } ], "responses": { "200": { "$ref": "#/components/responses/InventoryResponse" } } } }, "/v3/asns": { "post": { "tags": [ "ASN" ], "summary": "Create ASN", "operationId": "createAsn", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AsnRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } }, "/v3/asns/{asnNo}": { "get": { "tags": [ "ASN" ], "summary": "Get ASN Information", "operationId": "getAsn", "parameters": [ { "$ref": "#/components/parameters/AsnNoParam" } ], "responses": { "200": { "$ref": "#/components/responses/AsnResponse" } } }, "put": { "tags": [ "ASN" ], "summary": "Edit ASN", "operationId": "editAsn", "parameters": [ { "$ref": "#/components/parameters/AsnNoParam" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AsnRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } }, "/v3/add-on-services": { "get": { "tags": [ "ASN" ], "summary": "Get Add-on Services List", "operationId": "listAddOnServices", "responses": { "200": { "$ref": "#/components/responses/AddOnServiceListResponse" } } }, "post": { "tags": [ "ASN" ], "summary": "Create Add-on Service", "operationId": "createAddOnService", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddOnServiceRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } }, "/v3/add-on-services/{serviceId}": { "put": { "tags": [ "ASN" ], "summary": "Edit Add-on Service", "operationId": "editAddOnService", "parameters": [ { "$ref": "#/components/parameters/ServiceIdParam" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddOnServiceRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } }, "delete": { "tags": [ "ASN" ], "summary": "Delete Add-on Service", "operationId": "deleteAddOnService", "parameters": [ { "$ref": "#/components/parameters/ServiceIdParam" } ], "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } }, "/v3/orders": { "post": { "tags": [ "Order" ], "summary": "Create Order", "operationId": "createOrder", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } }, "/v3/orders/{orderCode}": { "get": { "tags": [ "Order" ], "summary": "Get Order Information", "operationId": "getOrder", "parameters": [ { "$ref": "#/components/parameters/OrderCodeParam" } ], "responses": { "200": { "$ref": "#/components/responses/OrderResponse" } } }, "put": { "tags": [ "Order" ], "summary": "Edit Order", "operationId": "editOrder", "parameters": [ { "$ref": "#/components/parameters/OrderCodeParam" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } }, "/v3/orders/{orderCode}/status": { "patch": { "tags": [ "Order" ], "summary": "Edit Order Status", "operationId": "editOrderStatus", "parameters": [ { "$ref": "#/components/parameters/OrderCodeParam" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderStatusRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } }, "/v3/orders/special": { "post": { "tags": [ "Order" ], "summary": "Create Special Order", "operationId": "createSpecialOrder", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } }, "/v3/orders/self-pickup": { "post": { "tags": [ "Order" ], "summary": "Create Self-pickup Order", "operationId": "createSelfPickupOrder", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } }, "/v3/orders/{orderCode}/intercept": { "post": { "tags": [ "Order" ], "summary": "Intercept Order", "operationId": "interceptOrder", "parameters": [ { "$ref": "#/components/parameters/OrderCodeParam" } ], "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } }, "/v3/countries": { "get": { "tags": [ "Utility" ], "summary": "Get Country List", "operationId": "getCountryList", "responses": { "200": { "$ref": "#/components/responses/CountryListResponse" } } } }, "/v3/warehouses": { "get": { "tags": [ "Utility" ], "summary": "Get Warehouse List", "operationId": "getWarehouseList", "responses": { "200": { "$ref": "#/components/responses/WarehouseListResponse" } } } }, "/v3/shipping-types": { "get": { "tags": [ "Utility" ], "summary": "Get Shipping Type List", "operationId": "getShippingTypeList", "responses": { "200": { "$ref": "#/components/responses/ShippingTypeListResponse" } } } }, "/v3/rates/quote": { "post": { "tags": [ "Utility" ], "summary": "Get Rate Quote", "operationId": "getRateQuote", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RateQuoteRequest" } } } }, "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } }, "/v3/trackings/{trackingNumber}": { "get": { "tags": [ "Utility" ], "summary": "Get Tracking Information", "operationId": "getTrackingInfo", "parameters": [ { "$ref": "#/components/parameters/TrackingNumberParam" } ], "responses": { "200": { "$ref": "#/components/responses/SuccessResponse" } } } } }, "components": { "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "in": "header", "name": "X-SFC-API-KEY", "description": "Integration account API key." }, "SignatureAuth": { "type": "apiKey", "in": "header", "name": "X-SFC-SIGNATURE", "description": "Request signature generated by the integration secret." } }, "parameters": { "ProductCodeParam": { "name": "productCode", "in": "path", "required": true, "schema": { "type": "string" } }, "AsnNoParam": { "name": "asnNo", "in": "path", "required": true, "schema": { "type": "string" } }, "ServiceIdParam": { "name": "serviceId", "in": "path", "required": true, "schema": { "type": "string" } }, "OrderCodeParam": { "name": "orderCode", "in": "path", "required": true, "schema": { "type": "string" } }, "TrackingNumberParam": { "name": "trackingNumber", "in": "path", "required": true, "schema": { "type": "string" } }, "PageParam": { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1 } }, "PageSizeParam": { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 200, "default": 20 } } }, "responses": { "SuccessResponse": { "description": "API call succeeded.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResponse" } } } }, "ErrorResponse": { "description": "API call failed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiResponse" } } } }, "ProductResponse": { "description": "Product detail response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Product" } } } ] } } } }, "InventoryResponse": { "description": "Inventory list response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/InventoryItem" } } } } ] } } } }, "AsnResponse": { "description": "ASN detail response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Asn" } } } ] } } } }, "AddOnServiceListResponse": { "description": "Add-on service list response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/AddOnService" } } } } ] } } } }, "OrderResponse": { "description": "Order detail response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Order" } } } ] } } } }, "CountryListResponse": { "description": "Country list response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Country" } } } } ] } } } }, "WarehouseListResponse": { "description": "Warehouse list response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Warehouse" } } } } ] } } } }, "ShippingTypeListResponse": { "description": "Shipping type list response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/ApiResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ShippingType" } } } } ] } } } } }, "schemas": { "ApiResponse": { "type": "object", "properties": { "code": { "type": "integer", "description": "Business status code. 0 usually means success." }, "message": { "type": "string" }, "data": { "type": "object", "additionalProperties": true } }, "required": [ "code", "message" ] }, "CreateProductRequest": { "type": "object", "properties": { "productCode": { "type": "string" }, "productName": { "type": "string" }, "sku": { "type": "string" } }, "required": [ "productCode", "productName" ] }, "UpdateProductRequest": { "type": "object", "properties": { "productName": { "type": "string" }, "status": { "type": "string", "enum": [ "enabled", "disabled" ] } } }, "ProductStatusRequest": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "enabled", "disabled" ] } }, "required": [ "status" ] }, "AsnRequest": { "type": "object", "properties": { "asnNo": { "type": "string" }, "warehouseCode": { "type": "string" }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": true } } }, "required": [ "warehouseCode", "items" ] }, "AddOnServiceRequest": { "type": "object", "properties": { "serviceType": { "type": "string" }, "relatedAsnNo": { "type": "string" }, "remark": { "type": "string" } }, "required": [ "serviceType" ] }, "OrderRequest": { "type": "object", "properties": { "orderCode": { "type": "string" }, "recipient": { "type": "object", "additionalProperties": true }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": true } } }, "required": [ "orderCode", "items" ] }, "OrderStatusRequest": { "type": "object", "properties": { "status": { "type": "string" } }, "required": [ "status" ] }, "RateQuoteRequest": { "type": "object", "properties": { "originCountry": { "type": "string" }, "destinationCountry": { "type": "string" }, "weight": { "type": "number", "format": "float" } }, "required": [ "originCountry", "destinationCountry", "weight" ] }, "Product": { "type": "object", "additionalProperties": true }, "InventoryItem": { "type": "object", "additionalProperties": true }, "Asn": { "type": "object", "additionalProperties": true }, "AddOnService": { "type": "object", "additionalProperties": true }, "Order": { "type": "object", "additionalProperties": true }, "Country": { "type": "object", "additionalProperties": true }, "Warehouse": { "type": "object", "additionalProperties": true }, "ShippingType": { "type": "object", "additionalProperties": true } } } }