Sandbox access token not working [Easyship] - api

We have to try to integrate Easyship courier API. And We are facing the below issue.
{
"rates": [],
"messages": [
"Sorry, we couldn't find any shipping solutions based on the information provided."
]
}
For more information, I have shared the request parameter and API response.
API URL:- https://api.easyship.com/v2/rates
Request Parameter:
{
"origin_address": {
"postal_code": "91601",
"city": "Los Ángeles",
"state": "CA",
"country_alpha2": "US"
},
"destination_address": {
"postal_code": "95140",
"city": "Mount Hamilton",
"state": "CA",
"country_alpha2": "US"
},
"parcels": [
{
"total_actual_weight": 5,
"items": [
{
"quantity": 1,
"category": "mobile_phones",
"dimensions": {
"width": 10,
"height": 10,
"length": 25
},
"description": "Apple iPad",
"actual_weight": 5,
"declared_currency": "USD",
"declared_customs_value": 49500.55
}
]
}
]
}
Response Parameter:
{
"status": "failure",
"errors": [
"Sorry, we couldn't find any shipping solutions based on the information provided."
],
"request_id": "545b5f76a41e2994a13f384559dee625",
"timestamp": "2022-10-12T10:09:21.272Z"
}
Note:
This request parameter works with the production access token.
We have applied all possible solutions for this issue but didn't find anything.
Also we don't want to use the production access token because we are in the developing stage. so please please provide working with a sandbox solution.

Related

Vonage WhatsApp messages suddenly stopped working

I have recently joined a company that is using Vonage and we have WhatsApp communications which was working fine in both dev and production that have both suddenly stopped working.
The shape of the incoming json looks to have changed significantly, but I have changed the code that is reading this and am able to read the messages into the system.
The problem that I have now, is outgoing message is not being accepted.
If I send this json body over
{
"from": "4474183xxxxx",
"to": "4474719xxxxx",
"message": {
"Type": "text",
"content": "Hello! I’m CAI, A Virtual Chat-bot assistant. blurb, more blurb.... .\n\n1. Okay I understand\n\nChoose any one option. Type \"1\" to choose first option."
}
}
I get the following response
{
"Status": "fail", // custom one to my company
"e3": {
"Error": {
"body": {
"type": "https://developer.vonage.com/api-errors",
"title": "Your request parameters didn't validate.",
"detail": "Found errors validating 1 of your submitted parameters.",
"invalid_parameters": [
{
"name": "to",
"reason": "Malformed JSON body."
}
],
"instance": "cf4bce73-2db5-4102-b7af-xxxxxx"
},
"headers": {
"date": "Wed, 02 Nov 2022 14:02:08 GMT",
"content-type": "application/problem+json",
"content-length": "287",
"connection": "close",
"x-envoy-upstream-service-time": "3",
"x-frame-options": "deny",
"x-xss-protection": "1; mode=block",
"strict-transport-security": "max-age=31536000; includeSubdomains",
"x-content-type-options": "nosniff",
"server": "envoy"
},
"statusCode": 400
},
"StatCode": 400,
"Response": null
},
"a": {
"label": 6,
"trys": [
[
0,
6,
null,
7
]
],
"ops": []
}
}
However, looking at the shape of the message that is on the website (https://dashboard.nexmo.com/messages/sandbox) and send this message
{
"from": "xxxx",
"to": "xxxx",
"message_type": "text",
"text": "Hello! I’m CAI, blurb... .\n\n1. Okay I understand\n\nChoose any one option. Type \"1\" to choose first option.",
"channel" : "whatsapp"
}
I get this response
{
"Status": "fail",
"e3": {},
"a": {
"label": 6,
"trys": [
[
0,
6,
null,
7
]
],
"ops": []
},
"Message": "Cannot read property 'Type' of undefined"
}
I would be grateful if someone could help me shape the message that needs to be sent to vonage to that this can be sent out to the end user \ recipient correct.
Thanks
Simon

Zoho Recruit API Register / Login Candidate

Could someone guide me an idea of how to create the registration and login for candidates with the Recruit api? I'm making a flutter app and I need my candidates to register and log in trow the app and see the job opening, post jobs.
At the moment I created the user with [POST] https://recruit.zoho.com/recruit/v2/Candidates
{
"data": [
{
"Email": "mail#gmail.com",
"First_Name": "TheName",
"Last_Name": "TheLastName",
"Mobile": "000000000",
"Expected_Salary": "8000000",
"Country": "PY",
"Departamento": "Central",
"C_I": "37114594",
"Ciudad_de_residencia": "City",
"$Password":"myPassWord199**"
}
],
"trigger": [
"approval",
"workflow",
"blueprint"
]
}
Works Well, got success
{
"data": [
{
"code": "SUCCESS",
"details": {
"Modified_Time": "2022-06-15T20:47:23-04:00",
"Modified_By": {
"name": "Admin",
"id": "00000000000000"
},
"Created_Time": "2022-06-15T20:47:23-04:00",
"id": "00000000000000",
"Created_By": {
"name": "Admin",
"id": "00000000000000"
}
},
"message": "record added",
"status": "success"
}
]
}
But If I try to log in in the web version (for testing the new candidate) don't work, but if it see the dashboard, the user exist. Need to add something else?
Basically I need a register api and a login one for the created record of the candidate.
Any help will be awesome, Thanks

Power Automate HTTP Request POST ends with "Internal Server Error"

I'm not sure why I face an "Internal Server Error" when I send an POST Request with Power Automate, but if I send the same request with Postman it works just fine. As you can see the flow tried 4 times until it stopped. I call the same REST API with Postman and it works without problems. The Authorization is by the way Basic with Username and Password.
This is the response from Postman when I send the POST request:
{
"executionTime": 3360,
"hints": [
{
"id": "STRING",
"name": "STRING",
"type": "GROUP_HINT",
"locations": [
{
"tokens": [
{
"start": 33,
"end": 41
},
{
"start": 61,
"end": 66
}
],
"score": 1.0,
"distance": 0,
"groupValue": {
"left": "STRING",
"right": "STRING"
}
}
],
"groupElement": [
"MATCHED GROUPS"
],
"range": 20
}
],
"businessCases": [
{
"businessCaseId": "ee05f8f9-e18d-4bf7-b7db-4c8bc800615a",
"name": "STRING",
"score": 0.53,
"hintCount": 1596,
"originCount": 241,
"matchedHints": [
"MATCHED GROUPS"
],
"matchedBoostedHints": [
"MATCHED GROUPS"
],
"origins": [],
"matchedOrigins": [
"MATCHED GROUPS"
],
"matchedBoostedOrigins": [
"MATCHED GROUPS"
],
"unmatchedOrigins": []
}
],
"questions": [],
"extractedValues": []
}
The REST API should analyse the text in the POST request and return any matched groups through sentiment analysis.

Amadeus: How to get a successful response from the GET /shopping/hotel-offers/by-hotel endpoint?

Seems like no matter what hotel or check-in check-out dates I try, the GET /shopping/hotel-offers/by-hotel endpoint always returns no availability. The GET /shopping/hotel-offers for a city always returns one or more hotels that have availability. I understand that these can be cached results but then using any of those hotels in the GET /shopping/hotel-offers/by-hotel endpoint returns no availability
Example 1
GET https://test.api.amadeus.com/v2/shopping/hotel-offers?cityCode=NYC
(RESPONSE TRUNCATED FOR READABILITY)
{
"data": [
{
"type": "hotel-offers",
"hotel": {
"type": "hotel",
"hotelId": "BWNYC133",
"chainCode": "BW",
"dupeId": "700101379",
"name": "BEST WESTERN BOWERY HANBEE HTL"
...
"available": true,
"offers": [
{
"id": "15F1E33CA0571B94E27F2BA26CA4319C8A097B500D737AB68088E93AC813D2BC",
"rateCode": "SRS",
"rateFamilyEstimated": {
"code": "SRS",
"type": "C"
},
"boardType": "BREAKFAST",
"room": {
"type": "A1Q",
"typeEstimated": {
"category": "ACCESSIBLE_ROOM",
"beds": 1,
"bedType": "QUEEN"
},
}
...
],
...
}
Immediately followed by
GET https://test.api.amadeus.com/v2/shopping/hotel-offers/by-hotel?hotelId=BWNYC133
RESPONSE
{
"errors": [
{
"status": 400,
"code": 3664,
"title": "NO ROOMS AVAILABLE AT REQUESTED PROPERTY"
}
]
}
The same is true no matter what hotel in any city I try. Am I doing something wrong? I've been playing with the endpoints for a few hours now and have only been able to get a successful response from the hotels by city endpoint.
Appreciate any help provided.
EDIT
My issues are continuing in production now. I am getting no availability from /shopping/hotel-offers/by-hotel or /shopping/hotel-offers/{offerId} endpoints.
GET https://api.amadeus.com/v2/shopping/hotel-offers?cityCode=NYC&hotelIds=XTNYC130,ONNYCMIM,DSNYC132&checkInDate=2020-05-01&checkOutDate=2020-05-03&roomQuantity=1&adults=2&radius=5&radiusUnit=KM&paymentPolicy=NONE&includeClosed=false&bestRateOnly=true&view=FULL&sort=NONE
(RESPONSE TRUNCATED FOR READABILITY)
{
"data": [
{
"type": "hotel-offers",
"hotel": {
"type": "hotel",
"hotelId": "XTNYC130",
"chainCode": "XT",
"dupeId": "700070576"
"name": "DUANE STREET HOTEL",
},
"available": true,
"offers": [
{
"id": "394DF124A254A86DD6DA5D1A3084B543DFA462740EDAE34023151D479266C4DE",
"rateCode": "GMT"
}
],
"self": "https://api.amadeus.com/v2/shopping/hotel-offers/by-hotel?hotelId=XTNYC130&adults=2&checkInDate=2020-05-01&checkOutDate=2020-05-03&paymentPolicy=NONE&roomQuantity=1&view=FULL"
},
{
"type": "hotel-offers",
"hotel": {
"type": "hotel",
"hotelId": "ONNYCMIM",
"chainCode": "ON",
"dupeId": "700128992",
"name": "HOTEL MIMOSA"
},
"available": true,
"offers": [
{
"id": "547EA4B5F7F716DF083DFD19D857DAE0F1B6820E753D080F310737C5374AF857",
"rateCode": "BAR"
}
],
"self": "https://api.amadeus.com/v2/shopping/hotel-offers/by-hotel?hotelId=ONNYCMIM&adults=2&checkInDate=2020-05-01&checkOutDate=2020-05-03&paymentPolicy=NONE&roomQuantity=1&view=FULL"
},
{
"type": "hotel-offers",
"hotel": {
"type": "hotel",
"hotelId": "DSNYC132",
"chainCode": "DS",
"dupeId": "700224946",
"name": "The Ludlow Hotel"
},
"available": true,
"offers": [
{
"id": "CC8CD3A64562527B6330E1A317584E78B68537B1E682115497037D28CB466FDE",
"rateCode": "RAC"
}
],
"self": "https://api.amadeus.com/v2/shopping/hotel-offers/by-hotel?hotelId=DSNYC132&adults=2&checkInDate=2020-05-01&checkOutDate=2020-05-03&paymentPolicy=NONE&roomQuantity=1&view=FULL"
}
]
}
GET https://api.amadeus.com/v2/shopping/hotel-offers/by-hotel?hotelId=XTNYC130&adults=2&checkInDate=2020-05-01&checkOutDate=2020-05-03&paymentPolicy=NONE&roomQuantity=1&view=FULL
RESPONSE
{
"errors": [
{
"status": 400,
"code": 3664,
"title": "NO ROOMS AVAILABLE AT REQUESTED PROPERTY"
}
]
}
GET https://api.amadeus.com/v2/shopping/hotel-offers/by-hotel?hotelId=ONNYCMIM&adults=2&checkInDate=2020-05-01&checkOutDate=2020-05-03&paymentPolicy=NONE&roomQuantity=1&view=FULL
RESPONSE
{
"errors": [
{
"status": 400,
"code": 3664,
"title": "NO ROOMS AVAILABLE AT REQUESTED PROPERTY"
}
]
}
GET https://api.amadeus.com/v2/shopping/hotel-offers/by-hotel?hotelId=DSNYC132&adults=2&checkInDate=2020-05-01&checkOutDate=2020-05-03&paymentPolicy=NONE&roomQuantity=1&view=FULL
RESPONSE
{
"errors": [
{
"status": 400,
"code": 3664,
"title": "NO ROOMS AVAILABLE AT REQUESTED PROPERTY"
}
]
}
GET https://api.amadeus.com/v2/271FFDEF4E7FD5E1EEB10BFE59B0880B5F6AF4DCA73BA57E5489FDFE7E95AFCD
{
"errors": [
{
"status": 400,
"code": 477,
"title": "INVALID FORMAT"
}
]
}
We are experiencing temporary problems with some of our hotel providers test systems which is leading to slower than usual response times or timeouts as in your example. We tried the same request, and for most of the time, it does work, so while we are working with our providers to resolve this issue, you can try to do the request a few times until you have a response.
Sorry for the inconvenience!

eBay API issues - cannot publish an offer

All of the following is being performed in eBay's API sandbox.
I am attempting to list an item by using the inventory API. Specifically, I have created an inventory item and a relevant offer for that item. When I make a POST request to the publish offer endpoint, I get the following error:
{
"errors": [
{
"errorId": 25016,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "The title value is invalid. Seller Provided Title Value is missing."
},
{
"errorId": 25002,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "A user error has occurred. The duration \"GTC\" day(s) is not available for this listing type, or invalid for category \"49996\".",
"parameters": [
{
"name": "0",
"value": "GTC"
},
{
"name": "1",
"value": "49996"
}
]
}
]
}
I can't see any reference in any of the API documentation to a "Seller Provided Title". The duration error is also confusing as the API says it only supports "GTC" listings. The product has a title so it must be in reference to something else.
My inventory item is as follows:
{
"sku": "13725",
"product": {
"title": "Harley Davidson bike",
"aspects": {
"Year": [
"2016"
],
"Model": [
"Road Glide Special"
],
"Manufacurer": [
"Harley-Davidson®"
],
"Type": [
"Touring"
],
"For Sale By": [
"Dealer"
],
"Vehicle Title": [
"Clear"
],
"Mileage": [
"13393"
],
"VIN (Vehicle Identification Number)": [
"1HD1KTM10GB627264"
],
"Color": [
"Black Quartz"
]
},
"description": "Item description goes here",
"imageUrls": [
"https://dw4i9za0jmiyk.cloudfront.net/2018/01/12/pre_ic60e5df584b870c3d2a55c86800eede_70618b24eb08.jpg"
]
},
"condition": "USED_EXCELLENT",
"availability": {
"pickupAtLocationAvailability": [
{
"quantity": 1,
"merchantLocationKey": "425",
"availabilityType": "IN_STOCK",
"fulfillmentTime": {
"value": 1,
"unit": "DAY"
}
}
]
}
}
And my offer object is as follows:
{
"offerId": "5852159010",
"sku": "13725",
"marketplaceId": "EBAY_MOTORS",
"format": "FIXED_PRICE",
"availableQuantity": 0,
"pricingSummary": {
"price": {
"value": "18294.0",
"currency": "USD"
}
},
"listingPolicies": {
"paymentPolicyId": "5807565000",
"fulfillmentPolicyId": "5806186000"
},
"categoryId": "49996",
"merchantLocationKey": "425",
"tax": {
"applyTax": false
},
"status": "UNPUBLISHED",
"eBayPlusEligible": false
}
I had similar issues on sandbox, and came to the conculsion it was broken.
They also have some limits on only certain categories working.
Have you tried it agains the live API, I have found this to be far more reliable, ignoring the fact doing development work live is dangerous!
For your info here is my working code offer:
inventory_template = {
"availability": {
"shipToLocationAvailability": {
"quantity": product.quantity_available
}
},
"condition": "NEW",
"product": {
"aspects": {spec.name: [spec.value] for spec in product.specifics},
"brand": product.product_brand,
"description": product.product_description,
"imageUrls": [
"https://ebay.mydomain.co.uk/{}".format(img.image_link) for img in product.images],
"mpn": product.product_mpn,
"title": product.product_title,
"upc": [
product.product_upc,
],
"ean": [
product.product_ean,
],
# "epid": "string"
},
"sku": sku,
}
offer_body = {
"availableQuantity": offer.available_quantity,
"categoryId": offer.category_id,
"listingDescription": html,
"listingPolicies": {
"paymentPolicyId": offer.payment_policy_id,
"returnPolicyId": offer.return_policy_id,
"fulfillmentPolicyId": offer.fulfillment_policy_id,
},
"merchantLocationKey": offer.merchant_location_key,
"pricingSummary": {
"price": {
"value": offer.summary_price_value,
"currency": offer.summary_price_currency
}
},
"sku": offer.sku,
"marketplaceId": offer.marketplace_id,
"format": offer.format
}
the offer.available_quantity etc are items from my database, its the structure I'm showing.