Listing Update API¶
This API may be used to change a few attributes only, of an already created listing. It is the same API as the above,
with minor changes to the operationType
field, explained below
Authentication:
As explained in the Authentication section, this API requires the Authentication token as a
header.
Coordinates
Staging: seller-network-testing.pincode.com
Production: shopping-network.phonepe.com
Resource: POST /tsp/catalog/v1/listing
curl --request POST \
--url 'https://seller-network-testing.pincode.com/tsp/catalog/v1/listing' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: O-Bearer <token>' \
--data ' {
"requestContext": {
"requestId": "R122334343412",
"transactionId": "R122334343412"
},
"messages": [
{
"messageId": "M23434343",
"operationType": "PARTIAL_UPDATE",
"serviceProviderId": "72387283",
"serviceProviderItemId": "32832839282",
"data": {
"type": "PRICE",
"price": {
"mrp": 202.32,
"sellingPrice": 189,
"currency" : "INR"
}
}
},
{
"messageId": "M2343434322323",
"serviceProviderId": "72387283",
"serviceProviderItemId": "3283283928",
"operationType": "PARTIAL_UPDATE",
"data": {
"type": "STATUS",
"status": "ACTIVE"
}
},
{
"messageId": "M23434343223234",
"serviceProviderId": "72387283",
"serviceProviderItemId": "3283283928",
"operationType": "PARTIAL_UPDATE",
"data": {
"type": "QUANTITY_LIMIT",
"maxOrderQuantity": 4
}
},
{
"messageId": "M23434343223232323",
"serviceProviderId": "72387283",
"serviceProviderItemId": "32832839282233",
"operationType": "PARTIAL_UPDATE",
"data": {
"type": "INVENTORY",
"inventory": {
"type": "COUNT",
"count": 10
}
}
}
]
}
import requests
url = 'https://seller-network-testing.pincode.com/tsp/catalog/v1/listing'
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': f'O-Bearer {token}'
}
data = {
"requestContext": {
"requestId": "R122334343412",
"transactionId": "R122334343412"
},
"messages": [
{
"messageId": "M23434343",
"operationType": "PARTIAL_UPDATE",
"serviceProviderId": "72387283",
"serviceProviderItemId": "32832839282",
"data": {
"type": "PRICE",
"price": {
"mrp": 202.32,
"sellingPrice": 189,
"currency" : "INR"
}
}
},
{
"messageId": "M2343434322323",
"serviceProviderId": "72387283",
"serviceProviderItemId": "3283283928",
"operationType": "PARTIAL_UPDATE",
"data": {
"type": "STATUS",
"status": "ACTIVE"
}
},
{
"messageId": "M23434343223234",
"serviceProviderId": "72387283",
"serviceProviderItemId": "3283283928",
"operationType": "PARTIAL_UPDATE",
"data": {
"type": "QUANTITY_LIMIT",
"maxOrderQuantity": 4
}
},
{
"messageId": "M23434343223232323",
"serviceProviderId": "72387283",
"serviceProviderItemId": "32832839282233",
"operationType": "PARTIAL_UPDATE",
"data": {
"type": "INVENTORY",
"inventory": {
"type": "COUNT",
"count": 10
}
}
}
]
}
response = requests.post(url, headers=headers, json=data)
Response:
{
"requestContext": {
"requestId" : "R122334343412",
"transactionId": "R122334343412"
},
"response" : {
"submissionId": "28327398273927392"
}
}
Field Explanation: Similar to the Listing Create API