Skip to main content

Update Customer Sales

PUT /v2/customer-sales

Parameters

NameDescriptionTypeLocation
tenantIdTenant IDstringheader
countryCodeCountry Codestringheader

Request body

Example Value

{
"customerId": "string",
"deliveryAddressId": "string",
"deliveryNote": "string",
"newDeliveryAddress": {
"state": "string",
"city": "string",
"address": "string",
"longitude": 0,
"latitude": 0,
"postalCode": "string",
"deliveryMode": "PICK_UP",
"customerPhoneNumber": "string"
},
"deliveryMode": "PICK_UP",
"orders": [
{
"productId": "string",
"quantity": 0,
"price": {
"price": 0,
"unitQuantity": 0,
"unitPrice": 0
}
}
],
"saleId": "string"
}

Schema

{
"customerId": "string",
"deliveryAddressId": "string",
"deliveryNote": "string",
"newDeliveryAddress": {
"state": "string",
"city": "string",
"address": "string",
"longitude": 0,
"latitude": 0,
"postalCode": "string",
"deliveryMode": "PICK_UP",
"customerPhoneNumber": "string"
},
"deliveryMode": "PICK_UP",
"orders": [
{
"productId": "string",
"quantity": 0,
"price": {
"price": 0,
"unitQuantity": 0,
"unitPrice": 0
}
}
],
"saleId": "string"
}

Responses

CodeDescriptionMedia type
200OK

Example Value

{
"status": "success",
"message": "Customer sales updated successfully"
}

Headers

NameTypeDescription
tenantIdstringTenant ID
countryCodestringCountry Code

Example Response

{
"message": "string",
"data": {
"transactionReference": "string",
"totalAmount": 0,
"globalOrderNumber": "string",
"paymentStatus": "PENDING",
"paymentMethod": "QR",
"extraPayloads": {
"ussdString": "string",
"bankCode": "string",
"accountNumber": "string",
"paymentLink": "string",
"navigatingUrl": "string",
"qrCode": "string"
},
"sales": [
{
"id": "string",
"totalAmount": 0,
"discount": 0,
"shippingFee": 0,
"orderAmount": 0,
"totalVat": 0,
"totalVatRatio": 0,
"requestId": "string",
"merchantId": "string",
"paymentMethod": "QR",
"paymentMode": "IN_STORE",
"paymentStatus": "PENDING",
"deliveryMode": "PICK_UP",
"deliveryStatus": "PENDING",
"orderNumber": "string",
"totalQuantity": 0,
"deliveryAddress": "string",
"customer": {
"country": {
"code": "string",
"name": "string",
"currency": "string"
},
"firstName": "string",
"lastName": "string",
"wallet": {
"userId": "string",
"virtualBankCode": "string",
"floatAccountId": "string",
"floatAccountUuid": "string",
"floatAccountNumber": "string",
"commissionAccountId": "string"
},
"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"
],
"businesses": [
{
"get_id": "string",
"name": "string",
"email": "string",
"photo": "string",
"wallet": {
"userId": "string",
"virtualBankCode": "string",
"floatAccountId": "string",
"floatAccountUuid": "string",
"floatAccountNumber": "string",
"commissionAccountId": "string"
},
"address": {
"country": "string",
"latitude": 0,
"lga": "string",
"name": "string",
"state": "string",
"longitude": 0
},
"location": {
"coordinates": [
0
],
"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": {
"userId": "string",
"virtualBankCode": "string",
"floatAccountId": "string",
"floatAccountUuid": "string",
"floatAccountNumber": "string",
"commissionAccountId": "string"
},
"id": "string",
"fullName": "string"
},
"businessHandle": "string",
"shippingFee": 0,
"phone": "string",
"category": "string",
"active": true,
"acceptingOrder": true,
"isDistributor": true,
"isManufacturer": true,
"isHead": true,
"extraLocationPrice": 0,
"distance": 0,
"kycDetails": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"pickUpAddresses": [
{
"country": "string",
"latitude": 0,
"lga": "string",
"name": "string",
"state": "string",
"longitude": 0,
"location": {
"coordinates": [
0
],
"type": "string"
}
}
],
"priceMargin": {
"type": "FIXED",
"source": "BUSINESS",
"value": 0,
"enabled": true
}
}
],
"address": "string",
"fullName": "string"
},
"agent": {
"country": {
"code": "string",
"name": "string",
"currency": "string"
},
"firstName": "string",
"lastName": "string",
"wallet": {
"userId": "string",
"virtualBankCode": "string",
"floatAccountId": "string",
"floatAccountUuid": "string",
"floatAccountNumber": "string",
"commissionAccountId": "string"
},
"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"
],
"businesses": [
{
"get_id": "string",
"name": "string",
"email": "string",
"photo": "string",
"wallet": {
"userId": "string",
"virtualBankCode": "string",
"floatAccountId": "string",
"floatAccountUuid": "string",
"floatAccountNumber": "string",
"commissionAccountId": "string"
},
"address": {
"country": "string",
"latitude": 0,
"lga": "string",
"name": "string",
"state": "string",
"longitude": 0
},
"location": {
"coordinates": [
0
],
"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": {
"userId": "string",
"virtualBankCode": "string",
"floatAccountId": "string",
"floatAccountUuid": "string",
"floatAccountNumber": "string",
"commissionAccountId": "string"
},
"id": "string",
"fullName": "string"
},
"businessHandle": "string",
"shippingFee": 0,
"phone": "string",
"category": "string",
"active": true,
"acceptingOrder": true,
"isDistributor": true,
"isManufacturer": true,
"isHead": true,
"extraLocationPrice": 0,
"distance": 0,
"kycDetails": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"pickUpAddresses": [
{
"country": "string",
"latitude": 0,
"lga": "string",
"name": "string",
"state": "string",
"longitude": 0,
"location": {
"coordinates": [
0
],
"type": "string"
}
}
],
"priceMargin": {
"type": "FIXED",
"source": "BUSINESS",
"value": 0,
"enabled": true
}
}
],
"address": "string",
"fullName": "string"
},
"seller": {
"get_id": "string",
"name": "string",
"email": "string",
"photo": "string",
"wallet": {
"userId": "string",
"virtualBankCode": "string",
"floatAccountId": "string",
"floatAccountUuid": "string",
"floatAccountNumber": "string",
"commissionAccountId": "string"
},
"address": {
"country": "string",
"latitude": 0,
"lga": "string",
"name": "string",
"state": "string",
"longitude": 0
},
"location": {
"coordinates": [
0
],
"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": {
"userId": "string",
"virtualBankCode": "string",
"floatAccountId": "string",
"floatAccountUuid": "string",
"floatAccountNumber": "string",
"commissionAccountId": "string"
},
"id": "string",
"fullName": "string"
},
"businessHandle": "string",
"shippingFee": 0,
"phone": "string",
"category": "string",
"active": true,
"acceptingOrder": true,
"isDistributor": true,
"isManufacturer": true,
"isHead": true,
"extraLocationPrice": 0,
"distance": 0,
"kycDetails": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"pickUpAddresses": [
{
"country": "string",
"latitude": 0,
"lga": "string",
"name": "string",
"state": "string",
"longitude": 0,
"location": {
"coordinates": [
0
],
"type": "string"
}
}
],
"priceMargin": {
"type": "FIXED",
"source": "BUSINESS",
"value": 0,
"enabled": true
}
},
"products": [
{
"productId": "string",
"productName": "string",
"images": [
"string"
],
"quantity": 0
}
],
"extraPayloads": {
"ussdString": "string",
"bankCode": "string",
"accountNumber": "string",
"paymentLink": "string",
"navigatingUrl": "string",
"qrCode": "string"
},
"sale": {
"createdAt": "2024-07-17T10:02:17.100Z",
"updatedAt": "2024-07-17T10:02:17.100Z",
"tenantId": "string",
"agentId": "string",
"merchantId": "string",
"businessId": "string",
"customerId": "string",
"customerBusinessId": "string",
"deliveryAddressId": {
"id": 0,
"uuid": "string",
"createdAt": "2024-07-17T10:02:17.100Z",
"updatedAt": "2024-07-17T10:02:17.100Z",
"state": "string",
"city": "string",
"address": "string",
"latitude": 0,
"longitude": 0,
"customerId": "string",
"tenantId": "string",
"postalCode": "string",
"deliveryMode": "PICK_UP",
"customerPhoneNumber": "string"
},
"requestId": "string",
"transactionReference": "string",
"paymentReference": "string",
"countryCode": "string",
"deliveryNote": "string",
"orderNumber": "string",
"globalOrderNumber": "string",
"totalQuantity": 0,
"isPartialParent": true,
"isPartial": true,
"isUpdated": true,
"isInStore": true,
"shippingFee": 0,
"orderAmount": 0,
"totalAmount": 0,
"discount": 0,
"totalPromotionDiscount": 0,
"totalVat": 0,
"totalVatRatio": 0,
"shippingFeeDetail": {
"shippingFee": 0,
"distanceCovered": 0,
"requestId": "string",
"dropOffUserId": "string"
},
"discountType": "FIXED",
"amountPaid": 0,
"paymentMethod": "QR",
"saleDetails": [
{
"id": 0,
"uuid": "string",
"createdAt": "2024-07-17T10:02:17.100Z",
"updatedAt": "2024-07-17T10:02:17.100Z",
"tenantId": "string",
"merchantId": "string",
"businessId": "string",
"countryCode": "string",
"sale": "string",
"product": {
"id": 0,
"uuid": "string",
"createdAt": "2024-07-17T10:02:17.100Z",
"updatedAt": "2024-07-17T10:02:17.100Z",
"tenantId": "string",
"merchantId": "string",
"businessId": "string",
"name": "string",
"description": "string",
"sku": "string",
"category": "string",
"subCategories": "string",
"brand": "string",
"countryCode": "string",
"productPublicId": "string",
"minimumOrderQuantity": 0,
"costPrice": {
"price": 0,
"unitQuantity": 0,
"unitPrice": 0
},
"sellingPrice": {
"price": 0,
"unitQuantity": 0,
"unitPrice": 0
},
"priceMargin": {
"type": "FIXED",
"source": "BUSINESS",
"value": 0,
"enabled": true
},
"promotion": {
"id": 0,
"uuid": "string",
"createdAt": "2024-07-17T10:02:17.100Z",
"updatedAt": "2024-07-17T10:02:17.100Z",
"tenantId": "string",
"merchantId": "string",
"name": "string",
"description": "string",
"discountType": "FIXED",
"amount": 0,
"percentage": 0,
"endDate": "2024-07-17T10:02:17.100Z",
"isActive": true
},
"quantityOnHand": 0,
"reorderLevel": 0,
"stockLevel": "OUT_OF_STOCK",
"unit": "string",
"weight": 0,
"visibility": true,
"images": [
"string"
],
"clusters": [
0
]
},
"quantity": 0,
"amount": 0,
"vat": 0,
"vatRatio": 0,
"promotionDiscount": 0,
"costPrice": 0,
"totalCostPrice": 0,
"profit": 0,
"sellingPrice": {
"price": 0,
"unitQuantity": 0,
"unitPrice": 0
},
"quantityRemaining": 0,
"parentSale": "string"
}
],
"deliveryStatus": "PENDING",
"deliveryMode": "PICK_UP",
"paymentMode": "IN_STORE",
"deliveryAddress": "string",
"paymentStatus": "PENDING",
"settlementStatus": "PENDING",
"settlementAttempt": 0,
"settlementAttemptNextRetry": "2024-07-17T10:02:17.101Z",
"settlementReference": "string",
"saleTransaction": {
"createdAt": "2024-07-17T10:02:17.101Z",
"updatedAt": "2024-07-17T10:02:17.101Z",
"amount": 0,
"totalShippingFee": 0,
"baseFare": 0,
"shippingFeeDetail": {
"totalDistanceCovered": 0,
"unitOfMeasurement": "string",
"baseFare": 0,
"unitPrice": 0,
"totalShippingFee": 0
},
"totalOrderAmount": 0,
"totalVat": 0,
"totalVatRatio": 0,
"sales": [
"string"
],
"tenantId": "string",
"countryCode": "string",
"paymentStatus": "PENDING",
"paymentMethod": "QR",
"paymentMode": "IN_STORE",
"transactionReference": "string",
"globalOrderNumber": "string",
"isEFT": true,
"eftAttachment": "string",
"isInStore": true,
"paymentResponseMessage": "string",
"totalSaleCount": 0,
"totalDeliveredSaleCount": 0,
"extraPayloads": {
"ussdString": "string",
"bankCode": "string",
"accountNumber": "string",
"paymentLink": "string",
"navigatingUrl": "string",
"qrCode": "string"
},
"settled": true,
"reQueryCount": 0,
"nextRetry": "2024-07-17T10:02:17.101Z"
},
"logisticsRequestId": "string",
"logisticsProvider": "string",
"parentSale": "string",
"salesTracking": [
{
"id": 0,
"uuid": "string",
"createdAt": "2024-07-17T10:02:17.101Z",
"updatedAt": "2024-07-17T10:02:17.101Z",
"deliveryStatus": "PENDING",
"sale": "string",
"isDelayed": true,
"merchantId": "string",
"businessId": "string",
"tenantId": "string"
}
],
"eft": true
}
}
]
},
"meta": {
"currentPage": 0,
"from": 0,
"to": 0,
"perPage": 0,
"total": 0,
"lastPage": 0
}
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request PUT \ 
--url /customer-sales \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


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