Skip to main content

Assign Transaction To Sale

PATCH {{baseUrl}}/sales/transactions

Description

This API endpoint is used to assign a transaction to a sale.

Request

  • Headers:

    • Content-Type: application/json
    • ApiKey: The platform API key is required to use this endpoint - {{PlatformApiKey}}
  • URL: {{baseUrl}}/sales/transactions

  • Request Body: JSON data containing the following information:

{
"amount": "<double>",
"paymentMethod": "BANK_TRANSFER",
"saleId": "<string>",
"transactionReference": "<string>"
}

Response Status: Created (201) Headers:

  • Content-Type: application/json
  • Accept: /

Sample Response

{
"message": "<string>",
"data": {
"id": "<string>",
"totalAmount": "<double>",
"discount": "<double>",
"shippingFee": "<double>",
"orderAmount": "<double>",
"requestId": "<string>",
"merchantId": "<string>",
"paymentMethod": "BANK_TRANSFER",
"paymentMode": "PREPAID",
"paymentStatus": "SUCCESSFUL",
"deliveryMode": "PICK_UP",
"deliveryStatus": "READY_FOR_PICKUP",
"orderNumber": "<string>",
"totalQuantity": "<integer>",
"deliveryAddress": "<string>",
"customer": {
"country": {
"code": "<string>",
"name": "<string>",
"currency": "<string>"
},
"firstName": "<string>",
"lastName": "<string>",
"wallet": {
"virtualBankCode": "<long>"
},
"city": {
"code": "<string>",
"name": "<string>"
},
"phone": "<string>",
"profileTenant": "<string>",
"photo": "<string>",
"get_id": "<string>",
"state": {
"code": "<string>",
"name": "<string>"
},
"username": "<string>",
"status": "<string>",
"profileOwners": [
"<string>",
"<string>"
],
"address": "<string>",
"fullName": "<string>"
},
"agent": {
"country": {
"code": "<string>",
"name": "<string>",
"currency": "<string>"
},
"firstName": "<string>",
"lastName": "<string>",
"wallet": {
"virtualBankCode": "<long>"
},
"city": {
"code": "<string>",
"name": "<string>"
},
"phone": "<string>",
"profileTenant": "<string>",
"photo": "<string>",
"get_id": "<string>",
"state": {
"code": "<string>",
"name": "<string>"
},
"username": "<string>",
"status": "<string>",
"profileOwners": [
"<string>",
"<string>"
],
"address": "<string>",
"fullName": "<string>"
},
"seller": {
"get_id": "<string>",
"name": "<string>",
"photo": "<string>",
"wallet": {
"proident3": {},
"Lorem_27": {},
"site6b": {}
},
"address": {
"country": "<string>",
"latitude": "<integer>",
"lga": "<string>",
"name": "<string>",
"state": "<string>",
"longitude": "<integer>"
},
"location": {
"coordinates": [
"<long>",
"<long>"
],
"type": "<string>"
},
"user": "<string>",
"owner": {
"profileTenant": "<string>",
"city": {
"code": "<string>",
"name": "<string>"
},
"country": {
"code": "<string>",
"name": "<string>",
"currency": "<string>"
},
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"photo": "<string>",
"state": {
"code": "<string>",
"name": "<string>"
},
"username": "<string>",
"wallet": {
"virtualBankCode": "<long>"
},
"id": "<string>",
"fullName": "<string>"
},
"businessHandle": "<string>",
"shippingFee": "<double>",
"phone": "<string>",
"category": "<string>",
"active": "<boolean>",
"acceptingOrder": "<boolean>",
"isDistributor": "<boolean>",
"isManufacturer": "<boolean>"
},
"products": [
{
"productId": "<string>",
"productName": "<string>",
"images": [
"<string>",
"<string>"
],
"quantity": "<integer>"
},
{
"productId": "<string>",
"productName": "<string>",
"images": [
"<string>",
"<string>"
],
"quantity": "<integer>"
}
],
"sale": {
"id": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"tenantId": "<string>",
"agentId": "<string>",
"merchantId": "<string>",
"businessId": "<string>",
"customerId": "<string>",
"requestId": "<string>",
"transactionReference": "<string>",
"paymentReference": "<string>",
"countryCode": "<string>",
"deliveryNote": "<string>",
"orderNumber": "<string>",
"globalOrderNumber": "<string>",
"totalQuantity": "<integer>",
"isPartialParent": "<boolean>",
"isPartial": "<boolean>",
"isUpdated": "<boolean>",
"shippingFee": "<double>",
"orderAmount": "<double>",
"totalAmount": "<double>",
"discount": "<double>",
"totalPromotionDiscount": "<double>",
"discountType": "PERCENTAGE",
"amountPaid": "<double>",
"paymentMethod": "WALLET_TRANSFER",
"saleDetails": [
{
"id": "<long>",
"uuid": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"tenantId": "<string>",
"merchantId": "<string>",
"businessId": "<string>",
"countryCode": "<string>",
"sale": {
"value": "<Circular reference to #/components/schemas/Sale detected>"
},
"product": {
"id": "<long>",
"uuid": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"tenantId": "<string>",
"merchantId": "<string>",
"businessId": "<string>",
"name": "<string>",
"description": "<string>",
"sku": "<string>",
"category": "<string>",
"subCategories": "<string>",
"brand": "<string>",
"countryCode": "<string>",
"productPublicId": "<string>",
"minimumOrderQuantity": "<integer>",
"costPrice": {
"price": "<double>",
"unitQuantity": "<integer>",
"unitPrice": "<double>"
},
"sellingPrice": {
"price": "<double>",
"unitQuantity": "<integer>",
"unitPrice": "<double>"
},
"promotion": {
"id": "<long>",
"uuid": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"tenantId": "<string>",
"merchantId": "<string>",
"name": "<string>",
"description": "<string>",
"discountType": "FIXED",
"amount": "<double>",
"percentage": "<integer>",
"endDate": "<dateTime>",
"isActive": "<boolean>"
},
"quantityOnHand": "<integer>",
"reorderLevel": "<integer>",
"stockLevel": "HIGH",
"unit": "<string>",
"weight": "<double>",
"visibility": "<boolean>",
"images": [
"<string>",
"<string>"
],
"clusters": [
"<long>",
"<long>"
]
},
"quantity": "<integer>",
"unitPrice": "<double>",
"amount": "<double>",
"promotionDiscount": "<double>",
"costPrice": "<double>",
"totalCostPrice": "<double>",
"profit": "<double>",
"sellingPrice": {
"price": "<double>",
"unitQuantity": "<integer>",
"unitPrice": "<double>"
},
"quantityRemaining": "<integer>",
"parentSale": {
"value": "<Circular reference to #/components/schemas/Sale detected>"
}
},
{
"id": "<long>",
"uuid": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"tenantId": "<string>",
"merchantId": "<string>",
"businessId": "<string>",
"countryCode": "<string>",
"sale": {
"value": "<Circular reference to #/components/schemas/Sale detected>"
},
"product": {
"id": "<long>",
"uuid": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"tenantId": "<string>",
"merchantId": "<string>",
"businessId": "<string>",
"name": "<string>",
"description": "<string>",
"sku": "<string>",
"category": "<string>",
"subCategories": "<string>",
"brand": "<string>",
"countryCode": "<string>",
"productPublicId": "<string>",
"minimumOrderQuantity": "<integer>",
"costPrice": {
"price": "<double>",
"unitQuantity": "<integer>",
"unitPrice": "<double>"
},
"sellingPrice": {
"price": "<double>",
"unitQuantity": "<integer>",
"unitPrice": "<double>"
},
"promotion": {
"id": "<long>",
"uuid": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"tenantId": "<string>",
"merchantId": "<string>",
"name": "<string>",
"description": "<string>",
"discountType": "PERCENTAGE",
"amount": "<double>",
"percentage": "<integer>",
"endDate": "<dateTime>",
"isActive": "<boolean>"
},
"quantityOnHand": "<integer>",
"reorderLevel": "<integer>",
"stockLevel": "LOW",
"unit": "<string>",
"weight": "<double>",
"visibility": "<boolean>",
"images": [
"<string>",
"<string>"
],
"clusters": [
"<long>",
"<long>"
]
},
"quantity": "<integer>",
"unitPrice": "<double>",
"amount": "<double>",
"promotionDiscount": "<double>",
"costPrice": "<double>",
"totalCostPrice": "<double>",
"profit": "<double>",
"sellingPrice": {
"price": "<double>",
"unitQuantity": "<integer>",
"unitPrice": "<double>"
},
"quantityRemaining": "<integer>",
"parentSale": {
"value": "<Circular reference to #/components/schemas/Sale detected>"
}
}
],
"deliveryStatus": "REJECTED",
"deliveryMode": "DISPATCH",
"paymentMode": "IN_STORE",
"deliveryAddress": "<string>",
"paymentStatus": "FAILED",
"saleTransaction": {
"id": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"amount": "<double>",
"totalShippingFee": "<double>",
"totalOrderAmount": "<double>",
"sales": [
{
"value": "<Circular reference to #/components/schemas/Sale detected>"
},
{
"value": "<Circular reference to #/components/schemas/Sale detected>"
}
],
"tenantId": "<string>",
"countryCode": "<string>",
"paymentStatus": "PENDING",
"paymentMethod": "USSD",
"paymentMode": "IN_STORE",
"transactionReference": "<string>",
"globalOrderNumber": "<string>"
},
"parentSale": {
"value": "<Circular reference to #/components/schemas/Sale detected>"
},
"salesTracking": [
{
"id": "<long>",
"uuid": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"deliveryStatus": "READY_TO_SHIP",
"sale": {
"value": "<Circular reference to #/components/schemas/Sale detected>"
},
"isDelayed": "<boolean>",
"merchantId": "<string>",
"businessId": "<string>",
"tenantId": "<string>"
},
{
"id": "<long>",
"uuid": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"deliveryStatus": "RETURN_CONFIRMED",
"sale": {
"value": "<Circular reference to #/components/schemas/Sale detected>"
},
"isDelayed": "<boolean>",
"merchantId": "<string>",
"businessId": "<string>",
"tenantId": "<string>"
}
]
}
},
"meta": {
"currentPage": "<long>",
"from": "<long>",
"to": "<long>",
"perPage": "<long>",
"total": "<long>",
"lastPage": "<long>"
}
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request PATCH \ 
--url /sales/transactions \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!