### GET /api/product/{sku} Source: https://customer-api.way2send.pl/swagger/docs/v1/index Retrieves detailed information about a specific product using its Stock Keeping Unit (SKU). ```APIDOC ## GET /api/product/{sku} ### Description Retrieves detailed information about a specific product using its Stock Keeping Unit (SKU). ### Method GET ### Endpoint /api/product/{sku} ### Parameters #### Path Parameters - **sku** (string) - Required - The SKU of the product to retrieve. ``` -------------------------------- ### GET /api/product/wms/{code} Source: https://customer-api.way2send.pl/swagger/docs/v1/index Retrieves all products from an external WMS system for a specified warehouse code. Returns a list of products or an internal error. ```APIDOC ## GET /api/product/wms/{code} ### Description Get all of the products from the external WMS system. ### Method GET ### Endpoint /api/product/wms/{code} ### Parameters #### Path Parameters - **code** (string) - Required - The code of the warehouse to get the products from. ### Response #### Success Response (200) - **ResponseItem[CustomerProductWmsDataModel[]]** - A list of products from the WMS. #### Error Response (500) - **IResponse** - Details of the internal server error. ``` -------------------------------- ### GET /api/product/{sku} Source: https://customer-api.way2send.pl/swagger/docs/v1/index Retrieves a specific product using its SKU. Returns product details on success or an error if the product is not found or an internal error occurs. ```APIDOC ## GET /api/product/{sku} ### Description Retrieves a specific product using its SKU. ### Method GET ### Endpoint /api/product/{sku} ### Parameters #### Path Parameters - **sku** (string) - Required - The SKU of the product to retrieve. ### Response #### Success Response (200) - **CustomerProductGetResponse** - The details of the requested product. #### Error Response (404) - **description** (string) - 'Not found' #### Error Response (500) - **IResponse** - Details of the internal server error. ``` -------------------------------- ### GET /api/order/return/{id} Source: https://customer-api.way2send.pl/swagger/docs/v1/index Retrieves all order returns associated with a specific order ID. Returns a list of returns for the given order. ```APIDOC ## GET /api/order/return/{id} ### Description Retrieves all order returns associated with a specific order ID. Returns a list of returns for the given order. ### Method GET ### Endpoint /api/order/return/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the order to retrieve the returns for. ### Response #### Success Response (200) - **OrdersReturnsListResponse** - Get order returns by order id. #### Error Response (404) - No returns found. #### Error Response (500) - **IResponse** - Error occured. ``` -------------------------------- ### GET /api/grn/{id} Source: https://customer-api.way2send.pl/swagger/docs/v1/index Retrieves a specific goods received note by its unique identifier. ```APIDOC ## GET /api/grn/{id} ### Description Retrieves a goods received note by its unique identifier. ### Method GET ### Endpoint /api/grn/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The number of the goods received note to retrieve. ### Responses #### Success Response (200) - **GoodsReceivedNoteGetResponse** - The details of the requested goods received note. #### Error Response (404) - Not found #### Error Response (500) - **IResponse** - An error occurred during the request. ``` -------------------------------- ### GET /orders/{id} Source: https://customer-api.way2send.pl/swagger/docs/v1/index Retrieves the details of a specific order by its unique identifier. This endpoint provides comprehensive information about a single order. ```APIDOC ## GET /orders/{id} ### Description Retrieves the details of a specific order by its unique identifier. This endpoint provides comprehensive information about a single order. ### Method GET ### Endpoint /orders/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the order to retrieve. ### Request Example ```http GET /orders/ord-abc ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A message describing the result of the operation. - **items** (array) - An array containing a single OrderModel object with the details of the requested order. - **id** (string) - Unique identifier for the order. - **number** (string) - Order number. - **w2sNumber** (string) - Order number in W2S system. - **externalNumber** (string) - External order number in source system. - **date** (string) - Order date in 'yyyy-MM-dd HH:mm:ss' format. - **status** (string) - Current order status. - **comment** (string) - Comment, usually putted on a courier label. - **description** (string) - Order description, usually putted on a courier label. - **invoice** (string) - Invoice number. - **courier** (string) - Order courier. - **courierService** (string) - Order courier service. - **courierNumber** (string) - Number of the order given by the courier system after order registration. - **returnLabelNumber** (string) - Return label number of the order. #### Response Example ```json { "success": true, "message": "Order retrieved successfully.", "items": [ { "id": "ord-abc", "number": "CUST-ORDER-456", "w2sNumber": "W2S-789", "externalNumber": null, "date": "2023-10-27T10:00:00Z", "status": "PENDING", "comment": "Handle with care", "description": null, "invoice": null, "courier": "UPS", "courierService": null, "courierNumber": null, "returnLabelNumber": null } ] } ``` ``` -------------------------------- ### GET /orders Source: https://customer-api.way2send.pl/swagger/docs/v1/index Retrieves a list of orders based on specified search criteria. This endpoint supports filtering by order IDs, dates, statuses, and pagination. ```APIDOC ## GET /orders ### Description Retrieves a list of orders based on specified search criteria. This endpoint supports filtering by order IDs, dates, statuses, and pagination. ### Method GET ### Endpoint /orders ### Parameters #### Query Parameters - **ids** (array of strings) - Optional - The unique identifiers of the orders to retrieve. - **relatedIds** (array of strings) - Optional - The unique identifiers of related entities (e.g., orders related to a return). - **createdFrom** (string) - Optional - Get orders created from this date (ISO 8601 format). - **createdTo** (string) - Optional - Get orders created to this date (ISO 8601 format). - **sentFrom** (string) - Optional - Get orders sent from this date (ISO 8601 format). - **sentTo** (string) - Optional - Get orders sent to this date (ISO 8601 format). - **statuses** (array of strings) - Optional - Get orders with these statuses. - **page** (integer) - Optional - Page number for pagination. Defaults to 1. ### Request Example ```http GET /orders?ids=ord-abc,ord-def&statuses=PENDING,PROCESSING&page=2 ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A message describing the result of the operation. - **items** (array) - An array of OrderModel objects matching the search criteria. - **id** (string) - Unique identifier for the order. - **number** (string) - Order number. - **w2sNumber** (string) - Order number in W2S system. - **externalNumber** (string) - External order number in source system. - **date** (string) - Order date in 'yyyy-MM-dd HH:mm:ss' format. - **status** (string) - Current order status. - **comment** (string) - Comment, usually putted on a courier label. - **description** (string) - Order description, usually putted on a courier label. - **invoice** (string) - Invoice number. - **courier** (string) - Order courier. - **courierService** (string) - Order courier service. - **courierNumber** (string) - Number of the order given by the courier system after order registration. - **returnLabelNumber** (string) - Return label number of the order. - **totalItemsCount** (integer) - The total number of items across all orders. - **totalPages** (integer) - The total number of pages for the response. #### Response Example ```json { "success": true, "message": "Orders retrieved successfully.", "items": [ { "id": "ord-abc", "number": "CUST-ORDER-456", "w2sNumber": "W2S-789", "externalNumber": null, "date": "2023-10-27T10:00:00Z", "status": "PENDING", "comment": "Handle with care", "description": null, "invoice": null, "courier": "UPS", "courierService": null, "courierNumber": null, "returnLabelNumber": null } ], "totalItemsCount": 10, "totalPages": 5 } ``` ``` -------------------------------- ### GET /api/order/{id} Source: https://customer-api.way2send.pl/swagger/docs/v1/index Retrieves a specific order using its order number. ```APIDOC ## GET /api/order/{id} ### Description Retrieves a specific order using its order number. ### Method GET ### Endpoint /api/order/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The order number of the order to retrieve. ### Response #### Success Response (200) - **OrderGetResponse** - The details of the requested order. #### Response Example ```json { "example": "OrderGetResponse object" } ``` #### Error Responses - **404**: Not found - **500**: Error occured ``` -------------------------------- ### GET /api/return/{returnId} Source: https://customer-api.way2send.pl/swagger/docs/v1/index Retrieves all returns associated with a specific return ID. Returns return details or an error if no returns are found or an internal error occurs. ```APIDOC ## GET /api/return/{returnId} ### Description Retrieves all returns for a given return ID. ### Method GET ### Endpoint /api/return/{returnId} ### Parameters #### Path Parameters - **returnId** (string) - Required - The ID of the return. ### Response #### Success Response (200) - **OrdersReturnsListResponse** - A list of returns associated with the provided return ID. #### Error Response (404) - **description** (string) - 'No returns found' #### Error Response (500) - **IResponse** - Details of the internal server error. ``` -------------------------------- ### Get Goods Received Note Source: https://customer-api.way2send.pl/swagger/docs/v1/index Retrieves details for a specific goods received note. This endpoint provides comprehensive information about a received shipment. ```APIDOC ## GET /api/goodsreceivednotes/{id} ### Description Retrieves a goods received note by its ID. ### Method GET ### Endpoint /api/goodsreceivednotes/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the goods received note. ### Response #### Success Response (200) - **GoodsReceivedNoteGetResponse** (object) - Contains the details of the goods received note. #### Response Example ```json { "success": true, "message": "Goods received note retrieved successfully.", "item": { "id": "string", "number": "string", "description": "string", "status": "string", "client": { "email": "string", "firstName": "string", "lastName": "string", "fullName": "string", "country": "string" }, "descriptionForWarehouse": "string", "supplier": "string", "documentDate": "2023-10-27T10:00:00Z", "issueDate": "2023-10-27T10:00:00Z", "operationDate": "2023-10-27T10:00:00Z", "cargoes": [ { "description": "string", "quantity": 0, "weight": 0, "volume": 0 } ] } } ``` ``` -------------------------------- ### POST /api/product Source: https://customer-api.way2send.pl/swagger/docs/v1/index Creates a new product or updates an existing one if a product with the same SKU already exists. Requires product creation model and returns the created/updated product details or an internal error. ```APIDOC ## POST /api/product ### Description Create new product providing all required information, or update existing one if product with provided SKU already exists. ### Method POST ### Endpoint /api/product ### Parameters #### Request Body - **customerProduct** (CustomerProductToCreateModel) - Required - The product information for creation or update. ### Request Example ```json { "sku": "NEW_SKU", "name": "New Product Name", "price": 19.99 } ``` ### Response #### Success Response (200) - **CustomerProductGetResponse** - The details of the created or updated product. #### Error Response (500) - **IResponse** - Details of the internal server error. ``` -------------------------------- ### POST /api/order Source: https://customer-api.way2send.pl/swagger/docs/v1/index Creates a new order. ```APIDOC ## POST /api/order ### Description Creates a new order. ### Method POST ### Endpoint /api/order ### Parameters #### Request Body - **order** (OrderToCreateModel) - Required - The data for the order to create. ### Responses #### Success Response (200) - **IResponse** - Indicates successful creation. #### Error Response (400) - **IResponse** - Bad request. #### Error Response (500) - **IResponse** - An error occurred during the request. ``` -------------------------------- ### Create Return Source: https://customer-api.way2send.pl/swagger/docs/v1/index Creates a new return for an order. This endpoint is used to initiate the return process for a customer. ```APIDOC ## POST /api/return ### Description Creates a new return. ### Method POST ### Endpoint /api/return ### Parameters #### Request Body - **returnModel** (object) - Required - The return to create. ### Request Example ```json { "example": "OrderReturnToCreateModel object" } ``` ### Response #### Success Response (200) - **IResponse** (object) - Confirmation of return creation. #### Response Example ```json { "example": "IResponse object" } ``` #### Error Response (400) - **IResponse** (object) - Bad request details. #### Error Response (500) - **IResponse** (object) - Error details. ``` -------------------------------- ### Order To Create Model Source: https://customer-api.way2send.pl/swagger/docs/v1/index Model for creating a new order, including order details, target recipient, and parcels. ```APIDOC ## Order To Create Model ### Description Model for creating a new order, including order details, target recipient, and parcels. ### Required Properties - **id** (string) - **date** (string) - format: date-time - **target** (object) - Reference to ClientDetailsModel - **courier** (object) - Reference to OrderCourierServiceModel ### Properties - **id** (string) - Order id - **number** (string) - Order number - **externalNumber** (string) - External order number in source system (e.g. shop, marketplace Allegro, etc.) - **returnLabelNumber** (string) - Return label number for return shipments - **date** (string) - Order date, format: date-time - **status** (string) - Order status - **target** (object) - Order target address and contact details (ClientDetailsModel) - **deliveryPointId** (string) - Delivery point id - **comment** (string) - Comment, usually putted on a courier label ``` -------------------------------- ### Product Details Source: https://customer-api.way2send.pl/swagger/docs/v1/index Retrieves detailed information about a specific product, including its quantity and barcodes. ```APIDOC ## GET /products/{productId} ### Description Retrieves detailed information about a specific product, including its quantity and barcodes. ### Method GET ### Endpoint /products/{productId} ### Parameters #### Path Parameters - **productId** (string) - Required - The unique identifier of the product. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **name** (string) - The name of the product. - **description** (string) - A description of the product. - **price** (object) - Pricing information for the product. - **key1** (string) - Example price key. - **key2** (string) - Example price value. - **totalQuantity** (integer) - Quantity of the product available in the warehouses. - **barcodes** (array of strings) - The barcodes of the product. #### Response Example ```json { "name": "Example Product", "description": "This is an example product.", "price": { "key1": "10.00", "key2": "1.00" }, "totalQuantity": 100, "barcodes": [ "123456789012", "987654321098" ] } ``` ``` -------------------------------- ### POST /api/product/search Source: https://customer-api.way2send.pl/swagger/docs/v1/index Finds existing products based on specified search criteria. Accepts a Product Search Model and returns a list of matching products or an internal error. ```APIDOC ## POST /api/product/search ### Description Finds existing products by one or more of the following parameters: sku, barcode, disabled, etc. ### Method POST ### Endpoint /api/product/search ### Parameters #### Request Body - **productSearchModel** (CustomerProductSearchModel) - Required - The search model containing the criteria. ### Request Example ```json { "sku": "EXAMPLE_SKU", "barcode": "EXAMPLE_BARCODE", "disabled": false } ``` ### Response #### Success Response (200) - **CustomerProductGetAllResponse** - A list of products matching the search criteria. #### Error Response (500) - **IResponse** - Details of the internal server error. ``` -------------------------------- ### Order Return Creation Source: https://customer-api.way2send.pl/swagger/docs/v1/index Creates a new order return request, specifying details about the return and associated cargo. ```APIDOC ## POST /returns ### Description Creates a new order return request, specifying details about the return and associated cargo. ### Method POST ### Endpoint /returns ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **orderId** (string) - Required - The unique number of the order associated with the return. - **returnKind** (string) - Required - Represents the type of return for an order. - **courier** (string) - Optional - Represents the courier used for the return shipment. - **courierOrderNumber** (string) - Optional - The courier order number associated with the order return. - **description** (string) - Optional - Represents an order return description. - **returnFromNumber** (string) - Optional - The return from number. - **returnDate** (string) - Optional - The return from date (ISO 8601 format). - **client** (object) - Required - Details of the client who is returning the order. - **id** (string) - Required - The unique identifier of the client. - **name** (string) - Required - The name of the client. - **email** (string) - Optional - The email address of the client. - **phone** (string) - Optional - The phone number of the client. - **cargoes** (array of objects) - Required - The cargo of the return. - **packageNumber** (string) - Required - The package number of the cargo item. - **trackingNumber** (string) - Optional - The tracking number for the cargo item. - **quantity** (integer) - Required - The quantity of the cargo item. - **description** (string) - Optional - A description of the cargo item. ### Request Example ```json { "orderId": "ORD12345", "returnKind": "DEFECTIVE", "courier": "UPS", "courierOrderNumber": "1Z999AA10123456784", "description": "Item arrived damaged.", "returnDate": "2023-10-27T10:00:00Z", "client": { "id": "CLI9876", "name": "John Doe", "email": "john.doe@example.com", "phone": "123-456-7890" }, "cargoes": [ { "packageNumber": "PKG001", "trackingNumber": "TRK123456", "quantity": 2, "description": "Damaged widget" } ] } ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier of the created return. - **orderId** (string) - The unique number of the order associated with the return. - **returnKind** (string) - Represents the type of return for an order. - **courier** (string) - Represents the courier used for the return shipment. - **courierOrderNumber** (string) - The courier order number associated with the order return. - **description** (string) - Represents an order return description. - **returnFromNumber** (string) - The return from number. - **returnDate** (string) - The return from date (ISO 8601 format). - **client** (object) - Details of the client who is returning the order. - **id** (string) - The unique identifier of the client. - **name** (string) - The name of the client. - **email** (string) - The email address of the client. - **phone** (string) - The phone number of the client. - **cargoes** (array of objects) - The cargo of the return. - **packageNumber** (string) - The package number of the cargo item. - **trackingNumber** (string) - The tracking number for the cargo item. - **quantity** (integer) - The quantity of the cargo item. - **description** (string) - A description of the cargo item. #### Response Example ```json { "id": "RET54321", "orderId": "ORD12345", "returnKind": "DEFECTIVE", "courier": "UPS", "courierOrderNumber": "1Z999AA10123456784", "description": "Item arrived damaged.", "returnDate": "2023-10-27T10:00:00Z", "client": { "id": "CLI9876", "name": "John Doe", "email": "john.doe@example.com", "phone": "123-456-7890" }, "cargoes": [ { "packageNumber": "PKG001", "trackingNumber": "TRK123456", "quantity": 2, "description": "Damaged widget" } ] } ``` ``` -------------------------------- ### POST /orders Source: https://customer-api.way2send.pl/swagger/docs/v1/index Creates a new order in the Way2Send system. This endpoint allows for detailed order creation, including product information, shipping details, and custom comments. ```APIDOC ## POST /orders ### Description Creates a new order in the Way2Send system. This endpoint allows for detailed order creation, including product information, shipping details, and custom comments. ### Method POST ### Endpoint /orders ### Parameters #### Request Body - **products** (array) - Required - An array of product objects to be included in the order. - **id** (string) - Required - The unique identifier of the product. - **quantity** (integer) - Required - The quantity of the product. - **weight** (double) - Optional - The weight of the product. - **length** (double) - Optional - The length of the product. - **width** (double) - Optional - The width of the product. - **height** (double) - Optional - The height of the product. - **barcode** (string) - Optional - The barcode of the product. - **cStoreId** (string) - Optional - The ID of the warehouse where the product is available. - **barcodes** (array of strings) - Optional - A list of barcodes for the product. - **orderNumber** (string) - Optional - The customer's order number. - **orderDate** (string) - Optional - The date of the order in 'yyyy-MM-dd HH:mm:ss' format. - **status** (string) - Optional - The initial status of the order. - **comment** (string) - Optional - A comment for the order, usually placed on the courier label. - **description** (string) - Optional - A description for the order, usually placed on the courier label. - **invoice** (string) - Optional - The invoice number. - **courier** (string) - Optional - The courier service to be used. - **courierService** (string) - Optional - The specific courier service. - **returnLabelNumber** (string) - Optional - The return label number. ### Request Example ```json { "products": [ { "id": "prod-123", "quantity": 2, "weight": 1.5, "length": 30.0, "width": 20.0, "height": 10.0, "barcode": "1234567890123" } ], "orderNumber": "CUST-ORDER-456", "comment": "Handle with care", "courier": "UPS" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A message describing the result of the operation. - **items** (array) - An array of OrderModel objects representing the created orders. - **id** (string) - Unique identifier for the order. - **number** (string) - Order number. - **w2sNumber** (string) - Order number in W2S system. - **externalNumber** (string) - External order number in source system. - **date** (string) - Order date in 'yyyy-MM-dd HH:mm:ss' format. - **status** (string) - Current order status. - **comment** (string) - Comment, usually putted on a courier label. - **description** (string) - Order description, usually putted on a courier label. - **invoice** (string) - Invoice number. - **courier** (string) - Order courier. - **courierService** (string) - Order courier service. - **courierNumber** (string) - Number of the order given by the courier system after order registration. - **returnLabelNumber** (string) - Return label number of the order. - **totalItemsCount** (integer) - The total number of items across all orders. - **totalPages** (integer) - The total number of pages for the response. #### Response Example ```json { "success": true, "message": "Order created successfully.", "items": [ { "id": "ord-abc", "number": "CUST-ORDER-456", "w2sNumber": "W2S-789", "externalNumber": null, "date": "2023-10-27T10:00:00Z", "status": "PENDING", "comment": "Handle with care", "description": null, "invoice": null, "courier": "UPS", "courierService": null, "courierNumber": null, "returnLabelNumber": null } ], "totalItemsCount": 1, "totalPages": 1 } ``` ``` -------------------------------- ### Create Goods Received Note Source: https://customer-api.way2send.pl/swagger/docs/v1/index Creates a new Goods Received Note (GRN) in the system. Requires detailed information about the GRN, including client, supplier, dates, and cargo items. ```APIDOC ## POST /api/v1/GoodsReceivedNotes ### Description Creates a new Goods Received Note (GRN) in the system. This endpoint requires a comprehensive payload detailing the GRN's information, associated client, supplier, relevant dates, and a list of cargo items. ### Method POST ### Endpoint /api/v1/GoodsReceivedNotes ### Parameters #### Request Body - **id** (string) - Required - The unique identifier for the GRN. - **originalNumber** (string) - Required - The original number of the GRN. - **description** (string) - Optional - A description for the GRN. - **client** (object) - Required - Details of the client associated with the GRN. - **id** (string) - Required - The unique identifier of the client. - **name** (string) - Required - The name of the client. - **descriptionForWarehouse** (string) - Optional - A description intended for warehouse personnel. - **supplier** (string) - Optional - The name of the supplier. - **documentDate** (string) - Required - The date of the GRN document (ISO 8601 format). - **issueDate** (string) - Required - The issue date of the GRN (ISO 8601 format). - **operationDate** (string) - Required - The operation date of the GRN (ISO 8601 format). - **outNumber1** (string) - Optional - An external reference number. - **outNumber2** (string) - Optional - An external reference number. - **outNumber3** (string) - Optional - An external reference number. - **cargoes** (array[object]) - Required - A list of cargo items to be included in the GRN. - **unitOfMeasure** (string) - Required - The measurement unit of the goods (e.g., 'kg', 'g'). - **quantity** (integer) - Required - The amount of goods. - **batchNumber** (string) - Optional - The batch number assigned to the goods. - **expirationDate** (string) - Optional - The date after which the goods should not be used (ISO 8601 format). - **sku** (string) - Required - The Stock Keeping Unit of the product. - **disabled** (boolean) - Optional - Indicates if the product is disabled (defaults to false). - **productName** (string) - Required - The name of the product. - **imgUrl** (string) - Optional - The URL of the product's image. - **logical_attributes** (array[string]) - Optional - List of names of active product logical attributes (e.g., 'fragile', 'trackExpirationDate'). - **value_attributes** (object) - Optional - Dictionary (name-value collection) of active product attributes with values (e.g., {"weight": "10.5"}). ### Request Example ```json { "id": "grn-456", "originalNumber": "PO-123", "description": "New shipment received", "client": { "id": "client-xyz", "name": "Another Client" }, "descriptionForWarehouse": "Urgent delivery", "supplier": "Supplier ABC", "documentDate": "2023-10-27T09:00:00Z", "issueDate": "2023-10-27T09:00:00Z", "operationDate": "2023-10-28T10:00:00Z", "outNumber1": "REF002", "cargoes": [ { "unitOfMeasure": "pcs", "quantity": 50, "batchNumber": "BATCH-B2", "expirationDate": "2025-06-30T23:59:59Z", "sku": "SKU-002", "productName": "Product B", "logical_attributes": ["trackBatchNumber"], "value_attributes": {"color": "blue"} } ] } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the GRN was created successfully. - **message** (string) - A confirmation message. #### Response Example ```json { "success": true, "message": "Goods Received Note created successfully." } ``` ``` -------------------------------- ### Order Details Source: https://customer-api.way2send.pl/swagger/docs/v1/index Provides details about an order, including COD information, delivery costs, discounts, currency, total value, and associated cargo, parcels, documents, and services. ```APIDOC ## GET /orders/{orderId} ### Description Retrieves the details of a specific order. ### Method GET ### Endpoint /orders/{orderId} ### Parameters #### Path Parameters - **orderId** (string) - Required - The unique identifier of the order. ### Response #### Success Response (200) - **isCod** (boolean) - Is order cash on delivery. - **cod** (number) - Order cod value in given currency. - **deliveryCost** (number) - Order delivery cost in given currency. - **discount** (number) - Order discount in given currency. - **currency** (string) - Order currency, Example: PLN, EUR, USD. - **total** (number) - Order total value in given currency. - **cargoes** (array) - Represents the list of cargo related to the order. Each cargo is represented by an instance of OrderCargoModel. - **parcels** (array) - Represents the list of parcels related to the order. Each parcel is represented by an instance of OrderParcelModel. - **documents** (array) - Contains the list of documents associated with the order. Each document is represented by an instance of FileModel. - **services** (array) - Holds the list of services provided by the courier for the order. Each service is represented by an instance of OrderCourierServiceModel. - **target** (object) - Order target address and contact details (ClientDetailsModel). - **hasAssociatedReturn** (boolean) - If the order has associated return. #### Response Example { "isCod": false, "cod": 0.0, "deliveryCost": 15.50, "discount": 5.00, "currency": "PLN", "total": 100.00, "cargoes": [ { "sku": "SKU123", "quantity": 2, "name": "Example Product", "price": 45.00, "description": "A sample product." } ], "parcels": [ { "parcelNumber": "PN789", "weight": 1.5, "dimensions": { "width": 10, "height": 20, "depth": 30 } } ], "documents": [ { "fileName": "invoice.pdf", "content": "JVBERi0xLjQKJc...", "contentType": "application/pdf" } ], "services": [ { "code": "NEXT_DAY", "value": 5.00 } ], "target": { "firstName": "Jan", "lastName": "Kowalski", "companyName": "Example Corp", "phone": "+48123456789", "email": "jan.kowalski@example.com", "address": { "streetName": "Example Street", "buildingNumber": "10", "apartmentNumber": "5", "postalCode": "00-001", "city": "Warsaw", "countryCode": "PL" } }, "hasAssociatedReturn": false } ``` -------------------------------- ### POST /api/grn Source: https://customer-api.way2send.pl/swagger/docs/v1/index Creates a new goods received note. ```APIDOC ## POST /api/grn ### Description Creates a new goods received note. ### Method POST ### Endpoint /api/grn ### Parameters #### Request Body - **grn** (GoodsReceivedNoteToCreateModel) - Required - The data for the goods received note to create. ### Responses #### Success Response (200) - **IResponse** - Indicates successful creation. #### Error Response (400) - **IResponse** - Bad request. #### Error Response (500) - **IResponse** - An error occurred during the request. ``` -------------------------------- ### POST /api/order Source: https://customer-api.way2send.pl/swagger/docs/v1/index Creates a new order for the customer. Requires order details in the request body. ```APIDOC ## POST /api/order ### Description Creates a new order for the customer. Requires order details in the request body. ### Method POST ### Endpoint /api/order ### Parameters #### Request Body - **order** (OrderToCreateModel) - Required - The order to create. ### Request Example ```json { "order": { "example": "OrderToCreateModel object" } } ``` ### Response #### Success Response (200) - **IResponse** - Description of the response schema. #### Response Example ```json { "example": "IResponse object" } ``` #### Error Responses - **400**: Bad request - **500**: Error occured ``` -------------------------------- ### File Model Source: https://customer-api.way2send.pl/swagger/docs/v1/index Represents a file to be uploaded or processed, including its name, content, and type. ```APIDOC ## File Model ### Description Represents a file to be uploaded or processed, including its name, content, and type. ### Required Properties - **fileName** (string) - **base64Content** (string) - **fileType** (string) - **contentType** (string) ### Properties - **fileName** (string) - Represents the file's name. Its values are always in string format. - **base64Content** (string) - Contains the actual content of the file encoded in base64 string format. - **fileType** (string) - Represents the type of file. It helps in determining how to handle the content of the file. - **contentType** (string) - Indicates the Internet media type (i.e., "MIME type") of the file which can be used to determine the method of opening/displaying the file. ``` -------------------------------- ### Customer Product Search API Source: https://customer-api.way2send.pl/swagger/docs/v1/index Allows searching for customer products based on SKUs, barcodes, and other criteria. You can also filter by creation date and product status. ```APIDOC ## GET /api/customer/products ### Description Retrieves a list of customer products based on specified search criteria. ### Method GET ### Endpoint /api/customer/products ### Parameters #### Query Parameters - **skus** (array[string]) - Optional - One or more product SKUs. - **barcodes** (array[string]) - Optional - One or more product barcodes/EANs. - **disabled** (boolean) - Optional - Specify if to return disabled products (false by default). - **createdFrom** (string) - Optional - Filter products created on or after this date-time. - **closeDate** (string) - Optional - Filter orders closed on or after this date. - **statuses** (array[string]) - Optional - Filter orders with these statuses. - **page** (integer) - Optional - Page number for pagination. - **sortBy** (string) - Optional - Field to sort by. Enum: "createdAt", "closeDate", "returnDate". Default is creation date. - **sortDirection** (string) - Optional - Sort direction. Enum: "asc", "desc". Default is descending. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **message** (string) - A message describing the result of the request. - **item** (object) - Contains the customer product details. - **disabled** (boolean) - Indicates if the product is disabled. - **imgUrl** (string) - The URL of the product's image. - **logical_attributes** (array[string]) - List of active product logical attributes. - **weight** (number) - The weight of the product. - **length** (integer) - The length of the product. - **width** (integer) - The width of the product. - **height** (integer) - The height of the product. - **cStoreId** (string) - The ID of the warehouse where the product is available. - **createdBy** (string) - Name of the user who created the product. - **created** (string) - Date when the product was created. - **updatedBy** (string) - Name of the user who updated the product. - **updated** (string) - Date when the product was updated. - **sku** (string) - The SKU of the product. - **productName** (string) - The name of the product. - **value_attributes** (object) - Dictionary of active product attributes with values. - **totalQuantity** (integer) - Quantity of the product available in warehouses. - **barcodes** (array[string]) - The barcodes of the product. #### Response Example ```json { "success": true, "message": "Products retrieved successfully.", "item": { "disabled": false, "imgUrl": "http://example.com/image.jpg", "logical_attributes": ["fragile", "trackExpirationDate"], "weight": 1.5, "length": 10, "width": 5, "height": 3, "cStoreId": "WH123", "createdBy": "admin", "created": "2023-10-27T10:00:00Z", "updatedBy": "admin", "updated": "2023-10-27T10:00:00Z", "sku": "PROD-001", "productName": "Example Product", "value_attributes": { "color": "blue", "size": "M" }, "totalQuantity": 100, "barcodes": ["123456789012"] } } ``` ``` -------------------------------- ### Order Returns API Source: https://customer-api.way2send.pl/swagger/docs/v1/index This section covers the API endpoints related to managing order returns, including retrieving lists of returns and their details. ```APIDOC ## GET /returns ### Description Retrieves a list of order returns, with options for filtering and pagination. ### Method GET ### Endpoint /returns ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **pageSize** (integer) - Optional - The number of items per page. - **orderId** (string) - Optional - Filter returns by a specific order ID. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A message describing the result of the operation. - **items** (array of OrderReturnModel) - A list of order return objects. - **totalItemsCount** (integer) - The total number of items available. - **totalPages** (integer) - The total number of pages. #### Response Example ```json { "success": true, "message": "Returns retrieved successfully.", "items": [ { "id": "RET001", "orderId": "ORD12345", "returnNumber": "RTN98765", "returnKind": "Damaged" } ], "totalItemsCount": 1, "totalPages": 1 } ``` ``` -------------------------------- ### PUT /api/order/targetDetails/{id} Source: https://customer-api.way2send.pl/swagger/docs/v1/index Updates the delivery address of an existing order. Requires the order ID and client details. ```APIDOC ## PUT /api/order/targetDetails/{id} ### Description Updates the delivery address of an existing order. Requires the order ID and client details. ### Method PUT ### Endpoint /api/order/targetDetails/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The order number. #### Request Body - **clientDetailsModel** (ClientDetailsModel) - Required - The client details to be updated. ### Request Example ```json { "id": "string", "clientDetailsModel": { "example": "ClientDetailsModel object" } } ``` ### Response #### Success Response (200) - **IResponse** - Order delivery address updated successfully. #### Response Example ```json { "example": "IResponse object" } ``` #### Error Responses - **400**: Bad request - **500**: Error occured ``` -------------------------------- ### POST /api/grn/search Source: https://customer-api.way2send.pl/swagger/docs/v1/index Searches for a list of goods received notes based on provided IDs. ```APIDOC ## POST /api/grn/search ### Description Retrieves a list of goods received notes by their IDs. ### Method POST ### Endpoint /api/grn/search ### Parameters #### Request Body - **searchRequest** (GoodsReceivedNoteSearchModel) - Required - The search criteria for goods received notes. ### Responses #### Success Response (200) - **GoodsReceivedNotesListResponse** - A list of matching goods received notes. #### Error Response (404) - Not found #### Error Response (500) - **IResponse** - An error occurred during the request. ```