VeePee Returns
Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)
Date | Version | Name | Applied changes |
---|---|---|---|
15.02.2023 | v1.0 | Bogomil Pavlov | First Publish |
12.04.2023 | v1.1 | Bogomil Pavlov | Update the way we store errors in Order Error Table |
20.04.2023 | v1.2 | Bogomil Pavlov | Include the acceptance step in the flow. |
Tagged with (v1.2) | |||
30.06.2023 | v.1.3 | Bogomil Pavlov | Added the list with return reasons |
Tagged with (v1.3) | |||
12.07.2023 | v1.4 | Bogomil Pavlov | Add validation for shipping cost |
Tagged with (v1.4) |
The purpose of this document is to give detailed explanation how Returns for VeePee would work.
The returns on VeePee are straightforward and we can either Accept or Reject a return. We should be checking if there are new returns (claims) with status “PENDING“ only and please note we are storing only “PENDING“ returns and we do not want to download any cancelled or completed returns. If we get the return we need to store it as a claim in Order Claims table in Hemi. Then we have to decide if we want to reject or accept the return request. We can process a return manually or we should have default actions in Account VeePee for the Accept and Reject claims which are optional. If we reject the claim there are no any other steps we need to do just update the status of the claim on VeePee. (v1.2)If we accept the claim we need to make additional refund request from our refund UI to the buyer on VeePee.
Get Returns
We will be downloading only returns with status “PENDING“ in Hemi using the following request. Please note we will be receiving claims with only one product and only one quantity.
API Call: {{BaseURL}}/return-requests
API Docs: https://pinkstaging.pink-connect.com/swagger#operation/listReturnRequestsRequest:API Call: GET https://api-pinkstaging.pink-connect.com/v4/return-requests
Query Parameters:offset
- Number of records to skip for pagination
limit
- Maximum number of records to return
status
- Filter the return requests by status. Hardcoded as “PENDING“
Sample Response:
[
{
"returnRequestId": "47fa9035-66d2-4b9f-8819-ef2cff1fbd2e",
"orderId": 34932,
"orderLineId": 69735,
"marketplaceReturnId": "e903f246-1eac-4f8e-b7e6-210586f6c870",
"marketplaceOrderNumber": "Test_738-1160-1614399118",
"gtin": "1234567891013",
"quantity": 1,
"reason": "VOLUNTARY_RETURN",
"reasonInfo": "VOLUNTARY_RETURN",
"requestDate": "23/02/2023 09:02:46",
"status": "PENDING",
"type": "SENDTOSELLER"
}
]
Mapping:
VeePee Field | Hemi Field | Comment |
---|---|---|
returnRequestId |
Order Claim > Marketplace ID | Please note this is unique value which we should validate and make sure we do not make duplicates. |
orderId |
N/A | Used to map the claim to the correct order and this refers to our Orders > Marketplace Order Id |
orderLineId |
N/A | Based on this orderLineId we need to map our product in Hemi and get the correct Order Claim Row > Order Item Line ID |
marketplaceReturnId |
N/A | |
marketplaceOrderNumber |
N/A | |
gtin |
N/A | |
quantity |
N/A | We will always receive returns with 1 quantity |
reason |
Order Claim >Marketplace Reason | |
reasonInfo |
N/A | |
requestDate |
Order Claim >Marketplace Date | |
status |
Order Claim >Marketplace Status | The available statuses are: |
"PENDING"
"PROCESSING"
"COMPLETE"
"REJECTED"
"CANCELLED"
However we will be saving only “PENDING“ returns |
| type
| Order Claim >Marketplace Type | |
| | Order Claim > Initiated By | Hardcoded as “Buyer“ |
| | Order Claim > Type | Hardcoded as “Return“ |
When we are downloading returns we need to be checking if the default actions are set or we store it with empty Order Claim > Action and Order Claim > Status
Claim Status Mapping:
VeePee Return Status | Hemi Claim Action | Hemi Claim Status | Comment |
---|---|---|---|
PENDING |
N/A | N/A | If we have a default action set as “Accept” |
We set this fields as: Order Claim > Action - Accept Order Claim > Status - Pending
If we have a default action set as “Reject” We set this fields as: Order Claim > Action - Reject Order Claim > Status - Pending
If no default action is set in Account VeePee we leave them empty. |
| PROCESSING
| N/A | N/A | |
| COMPLETE
| N/A | N/A | |
| REJECTED
| N/A | N/A | |
| CANCELLED
| N/A | N/A | |
(v1.2)Accept Returns
The accepting is simply updating the status of the return.
API Call: {{BaseURL}}/return-requests/{{returnRequestId}}/{{newStatus}}API Docs: https://pinkstaging.pink-connect.com/swagger#operation/updateReturnRequestStatus
Sample Request:API Call: PUT https://api-pinkstaging.pink-connect.com/v4/return-requests/b6e0f7f8-d952-4ff0-b1e1-5e8434b2ed1d/PROCESSING
Parameters Mapping:
VeePee Field | Required | Hemi Field | Comment |
---|---|---|---|
returnRequestId |
Yes | Order Claim > Marketplace ID | |
newStatus |
Yes | “PROCESSING“ | Hardcoded as “PROCESSING“ |
Sample Response:
If there is empty response it means success. Otherwise we will receive an error that we need to store accordingly. Please note we are still expecting to receive a status code in the 200s most notably 200 or 204 for success
There is two ways of accepting a claim it can be set as default or triggered manually.
1 When Default Action is Not selected:
If we would like to manually accept a return we just need to set it as Order Claim > Action = Accept and Order Claim > Status = Pending which will trigger the status update of the claim After success we want to mark the Order Claim > Status = Completed If we receive an error we want to store it in Order Errors table with the relevant error message **and set Order Claim > Status = Error**
2 When default action Is selected as “Accept“:
If we have default action set as Accept with the actual download of the claim we need to set it as Order Claim > Action = Accept and Order Claim > Status = Pending which will trigger the status update of the claim. After success we want to mark the Order Claim > Status = Completed If we receive an error we want to store it in Order Errors table with the relevant error message **and set Order Claim > Status = Error**
As previously mentioned all validations, triggers and updates are as per the validation based on the type of claim we can do here
Refund Returns
(v1.2)After a claim is accepted we can refund the buyer, but this is possible only if we have claim with Order Claim > Action = Accept and Order Claim > Status = Completed this will allow us to select the correct return for the refund and we must have Order > Status = Shipped in order to pick the refund for processing. There is nothing additional apart from what we are currently validating
API Call: {{BaseURL}}/orders/{{orderId}}/return In the API URL we have to specify our Orders >Marketplace Order Id API Docs: https://pinkstaging.pink-connect.com/swagger#operation/returnByOrder
Sample Request:API Call: POST https://api-pinkstaging.pink-connect.com/v4/orders/34935/return
Body: identifierType - This field specifies what is the identifier (OrderLineId) identifier - the id of the product quantity - The quantity we are returning reason -
Mapping:
VeePee Field | Required | Hemi Field | Comment |
---|---|---|---|
identifierType |
Yes | “OrderLineId” | Hardcoded as “OrderLineId“ |
identifier |
Yes | Order Item Line > Marketplace Order Item ID | |
quantity |
Yes | 1 | Will be always 1 because each claim contains one product with one quantity. |
reason |
No | Order Payment > Reasons | Order Claim > Action Reason is with priority |
Please note that we are not able to specify more than one OrderLineId in the request so we will have to make the requests per line. <v1.4> Also since we are not able to refund shipping cost when there is a return we want to add a validation and return error if we add the shipping cost in the refund rows.**</v1.4>**Sample Response:
If there is empty response it means success. Otherwise we will receive an error that we need to store accordingly. Please note we are still expecting to receive a status code in the 200s most notably 200 or 204 for success
(v1.2)In order to refund the return we should use the refund UI and be able to select the Return Id from the dropdown field when the type is “Return“

(v1.2)This will create the refund for the return and after successful response we need to process and update all relevant fields as described Refunds send general logicIf we receive an error we want to store it in Order Errors table with the relevant error message and set Order Claim > Status = Error and also the Order Payment > Status = Error
<v1.3>The reasons which we can use are:
Reason Code | Reason Name |
---|---|
UNKNOWN |
Unknown |
COUNTERFEIT |
Counterfeit |
INCORRECT_PRODUCT |
Incorrect Product |
PRODUCT_NOT_PURCHASED |
Product Not Purchased |
INVOLUNTARY_RETURN |
Involuntary Return |
DELIVERED_TOO_LATE |
Delivered Too Late |
NOT_RECEIVED |
Not Received |
POOR_QUALITY_NOT_FUNCTIONING |
Poor Quality Not Functioning |
PACKAGE_WAS_DAMAGED |
Package Was Damaged |
PRODUCT_DAMAGED |
Product Damaged |
PRODUCT_AND_PACKAGE_DAMAGED |
Product And Package Damaged |
INCORRECT_STYLE |
Incorrect Style |
PRODUCT_NOT_NEEDED |
Product Not Needed |
PRODUCT_NOT_MATCH_WITH_DESCRIPTION |
Product Not Match With Description |
MISSING_PARTS_ACCESSORIES |
Missing Parts Accessories |
VOLUNTARY_RETURN |
Voluntary Return |
PRODUCT_DIFFERENT_ORDERED |
Product Different Ordered |
INCORRECT_PRODUCT_IMAGE |
Incorrect Product Image |
MORE_THAN_ONE_SIZE |
More Than One Size |
SIZE_DONT_FIT |
Size Dont Fit |
We want to include them as a dropdown list and want to display the name in UI and send the code.
By default we would like to use “UNKNOWN
“ if nothing is specified
</1.3>
Reject Returns
The rejection is simply updating the status of the return.
API Call: {{BaseURL}}/return-requests/{{returnRequestId}}/{{newStatus}}API Docs: https://pinkstaging.pink-connect.com/swagger#operation/updateReturnRequestStatus
Sample Request:API Call: PUT https://api-pinkstaging.pink-connect.com/v4/return-requests/b6e0f7f8-d952-4ff0-b1e1-5e8434b2ed1d/REJECTED
Parameters Mapping:
VeePee Field | Required | Hemi Field | Comment |
---|---|---|---|
returnRequestId |
Yes | Order Claim > Marketplace ID | |
newStatus |
Yes | “REJECTED“ | Hardcoded as “REJECTED“ |
Sample Response:
If there is empty response it means success. Otherwise we will receive an error that we need to store accordingly. Please note we are still expecting to receive a status code in the 200s most notably 200 or 204 for success
If we reject a return we need to update the claim status.
There is only way of rejection a claim however it can be set as default or triggered manually.
1 When Default Action is Not selected:
If we would like to manually trigger a refund we just need to set it as Order Claim > Action = Reject and Order Claim > Status = Pending which will trigger the status update of the claim After success we want to mark the Order Claim > Status = Completed If we receive an error we want to store it in Order Errors table with the relevant error message **and set Order Claim > Status = Error**
2 When default action Is selected as “Reject“:
If we have default action set as Reject with the actual download of the claim we need to set it as Order Claim > Action = Reject and Order Claim > Status = Pending which will trigger the status update of the claim. After success we want to mark the Order Claim > Status = Completed If we receive an error we want to store it in Order Errors table with the relevant error message **and set Order Claim > Status = Error**
As previously mentioned all validations, triggers and updates are as per the validation based on the type of claim we can do Claims general management