Getting error as "Invalid json in response body"
Please refer following code.
const instance = new ondc.ONDC({ "host": "http://localhost:5000", "action": "search", "bapId": "ondc.gofrugal.com/ondc/18275", "bapUri": "https://ondc.gofrugal.com/ondc/seller/adaptor", "bppId": "ondc.yaarilabs.com", "bppUri": "https://ondc.yaarilabs.com/", "domain": "nic2004:60232", "country": "IND", "city": "std:080", "ttl": "PT30S", "key": "<encryption key>", "signingPublicKey" : "<signing key>", "privateKey" : "<private key>", "uniqueKey" : "<uniqueKey>", "subscriberId" : "<subscriberId>" });
let body = {
"item": {
"descriptor": {
"name": "Milk"
}
},
"fulfillment": {
"end": {
"location": {
"gps": "12.4535445,77.9283792"
}
}
}
};
instance.apiKey = await instance.createAuthorizationHeader(body); let result = await instance.search(body);
@yogesh-karpe You need to run protocol server yourself or you can use the pilot one provided by ondc.
Where are details of ondc's pilot server? or how do we get api credentials? Thanks @risabhsharma71 @yogesh-karpe @ukrocks007
I have tried to get these details as well. I had them when I was building the package but then that portal was closed.
@ukrocks007 Were you able to get the credentials of the pilot server? I need to start with implementing the app in real.
Following
Pilot server urls and all tech-details: https://github.com/ONDC-Official/developer-docs/tree/main
Does Beckn specifications now come under ONDC? Does that mean we don't need to implement the protocol-servers(client and network side), and just the client side app (in my case it's BAP) Is there any exhaustive documentation literally giving steps for implementing.