Working with zoho api's - rest

I am working on ZOHO API's. Using POSTMAN I am trying to GET the details of a project. The API is as follows
GET /portal/[PORTALID]/projects/[PROJECTID]/
Sample Response
Status: 200 Success
Content Type: application/json;charset=utf-8
{
"projects": [{
"id": 170876000000765009,
"task_count": {
"open": 6,
"closed": 7
},
"milestone_count": {
"open": 2,
"closed": 1
},
"bug_count": {
"open": 2,
"closed": 1
},
"name": "Website Design Templates",
"status": "active",
"created_date": "10-22-2012 02:45 PM",
"created_date_long": 1350926134092,
"description": "This project is to discuss different design templates to build a website",
"owner_name": "Patricia Boyle",
"owner_id": "2060758",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/"
},
"activity": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/activities/"
},
"status": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/statuses/"
},
"milestone": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/milestones/"
},
"tasklist": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/tasklists/"
},
"task": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/tasks/"
},
"bug": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/bugs/"
},
"timesheet": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/logs/"
},
"event": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/events/"
},
"document": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/documents/"
},
"folder": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/folders/"
},
"forum": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/forums/"
},
"user": {
"url": "https://projectsapi.zoho.com/restapi/portal/
2063927/projects/170876000000765009/users/"
}
}
}]
}
The link is here
But when I try to GET the details. It gives me 404 error. Below is my request.
https://bugtracker.zoho.com/portal/fasi/projects/7958751212/
Authentication Token: c1d5c4cfd0bfcfd8b10caf0b174hhh
Moreover, in the link, there is nothing given that how to send the request. All there is sample response.
How can I send a correct request to get the details?
Any help would be highly appreciated.

Related

PayPal subscription approval link throws an error

I am using Postman for this. It generates the following link https://www.sandbox.paypal.com/webapps/billing/subscriptions?ba_token=BA-79D58732NX9686808 however when I visit it, I see the following error message:
Things don't appear to be working at the moment. Please try again later.
After getting a token, I created a product then I created a plan and finally, I created a subscription. Am I missing something?
Here is what I have done and the response I have received:
Create Product:
{
"id": "FF-SUBSCRIPTION-SERVICE-BASIC-T1",
"name": "Subscription Basic Plan",
"description": "Basic Service Subscription Plan",
"type": "SERVICE"
}
Create Plan:
{
"product_id": "FF-SUBSCRIPTION-SERVICE-BASIC-T1",
"name": "Subscription Basic Plan",
"description": "Basic Service Subscription Plan",
"status": "ACTIVE",
"payment_preferences": {
"auto_bill_outstanding": true,
"payment_failure_threshold": 5
},
"billing_cycles": [
{
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "TRIAL",
"sequence": 1,
"total_cycles": 1
},
{
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 2,
"total_cycles": 0,
"pricing_scheme": {
"fixed_price": {
"value": "14.99",
"currency_code": "USD"
}
}
}
]
}
Create Subscription:
{
"plan_id": "P-1DM03386YX156733CMNORKJQ",
"quantity": "1",
"shipping_amount": {
"currency_code": "USD",
"value": "14.99"
},
"subscriber": {
"name": {
"given_name": "John",
"surname": "Doe"
},
"email_address": "sb-xahhi21980157#personal.example.com"
}
},
"application_context": {
"brand_name": "X",
"locale": "en-US",
"shipping_preference": "SET_PROVIDED_ADDRESS",
"user_action": "SUBSCRIBE_NOW",
"payment_method": {
"payer_selected": "PAYPAL",
"payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED"
},
"return_url": "https://www.example.com/returnUrl",
"cancel_url": "https://www.example.com/cancelUrl"
}
}
The response I receive is as follows:
{
"status": "APPROVAL_PENDING",
"id": "I-N6DFDLTU8HK9",
"create_time": "2022-10-29T11:58:28Z",
"links": [
{
"href": "https://www.sandbox.paypal.com/webapps/billing/subscriptions?ba_token=BA-79D58732NX9686808",
"rel": "approve",
"method": "GET"
},
{
"href": "https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-N6DFDLTU8HK9",
"rel": "edit",
"method": "PATCH"
},
{
"href": "https://api-m.sandbox.paypal.com/v1/billing/subscriptions/I-N6DFDLTU8HK9",
"rel": "self",
"method": "GET"
}
]
}

Sabre BargainFinderMax REST API error for /offers/shop for southwest airlines (IATA code: WN)

We are trying to use BargainFinderMax REST API v3/offers/shop and /v4/offers/shop for southwest airlines (WN) but getting errors for the following requests in the CERT environment
We have tied both the old & new domain name endpoints (as per https://developer.sabre.com/guides/travel-agency/developer-guides/api-endpoints) but still throwing the error
New Endpoints:
https://api.cert.platform.sabre.com/v4/offers/shop
https://api.cert.platform.sabre.com/v3/offers/shop
Old Endpoints:
https://api-crt.cert.havail.sabre.com/v4/offers/shop
https://api-crt.cert.havail.sabre.com/v3/offers/shop
Request#1:
{
"OTA_AirLowFareSearchRQ": {
"MaxResponses": "10",
"OriginDestinationInformation": [{
"RPH": "1",
"DepartureDateTime": "2022-08-19T00:00:00",
"OriginLocation": {
"LocationCode": "SFO"
},
"DestinationLocation": {
"LocationCode": "LAX"
},
"TPA_Extensions": {
"SegmentType": {
"Code": "O"
}
}
}],
"POS": {
"Source": [{
"PseudoCityCode": "xxxx",
"RequestorID": {
"CompanyName": {
"Code": "TN"
},
"ID": "xxx.xx",
"Type": "x.xxx.x"
}
}]
},
"TravelPreferences": {
"MaxStopsQuantity": 99,
"TPA_Extensions": {
"DataSources": {
"ATPCO": "Enable",
"LCC": "Disable",
"NDC": "Disable"
},
"NumTrips": {
"Number": 10
}
},
"VendorPref": [{
"Code": "WN"
}]
},
"TravelerInfoSummary": {
"AirTravelerAvail": [{
"PassengerTypeQuantity": [{
"Code": "ADT",
"Quantity": 1
}]
}],
"PriceRequestInformation": {
"TPA_Extensions": {}
},
"SeatsRequested": [1]
},
"TPA_Extensions": {
"IntelliSellTransaction": {
"RequestType": {
"Name": "xxxITINS"
}
}
},
"Version": "3"
}
}
Request#2:
{
"OTA_AirLowFareSearchRQ": {
"MaxResponses": "10",
"OriginDestinationInformation": [{
"RPH": "1",
"DepartureDateTime": "2022-08-20T00:00:00",
"OriginLocation": {
"LocationCode": "SFO"
},
"DestinationLocation": {
"LocationCode": "LAX"
},
"TPA_Extensions": {
"SegmentType": {
"Code": "O"
}
}
}],
"POS": {
"Source": [{
"PseudoCityCode": "xxxx",
"RequestorID": {
"CompanyName": {
"Code": "TN"
},
"ID": "xx.xx",
"Type": "x.xxx.x"
}
}]
},
"TravelPreferences": {
"MaxStopsQuantity": 99,
"TPA_Extensions": {
"DataSources": {
"ATPCO": "Enable",
"LCC": "Disable",
"NDC": "Disable"
},
"NumTrips": {
"Number": 10
}
},
"VendorPref": [{
"Code": "WN"
}]
},
"TravelerInfoSummary": {
"AirTravelerAvail": [{
"PassengerTypeQuantity": [{
"Code": "ADT",
"Quantity": 1
}]
}],
"PriceRequestInformation": {
"TPA_Extensions": {}
},
"SeatsRequested": [1]
},
"TPA_Extensions": {
"IntelliSellTransaction": {
"RequestType": {
"Name": "xxxITINS"
}
}
},
"Version": "3"
}
}
Response#1:
{
"groupedItineraryResponse": {
"version": "6.6.1",
"messages": [{
"severity": "Info",
"type": "SERVER",
"code": "ASE032LPSCIL672.ATSE.CERT.ASCINT.SABRECIRRUS.COM",
"text": "27040"
}, {
"severity": "Info",
"type": "WORKERTHREAD",
"code": "TRANSACTIONID",
"text": "3620995504794847122"
}, {
"severity": "Info",
"type": "DRE",
"code": "RULEID",
"text": "13292"
}, {
"severity": "Info",
"type": "DEFAULT",
"code": "RULEID",
"text": "25238"
}, {
"severity": "Info",
"type": "SCHEDULES",
"code": "MSG",
"text": "NO FLIGHT SCHEDULES FOR QUALIFIERS USED"
}, {
"severity": "Error",
"type": "IF2",
"code": "PROCESS",
"text": "No complete journey can be built in IF2/ADVJR1."
}, {
"severity": "Error",
"type": "ERR",
"code": "ERR",
"text": "Error during Processing"
}],
"statistics": {
"itineraryCount": 0
}
}
}
Response#2:
{
"groupedItineraryResponse": {
"version": "6.3.0",
"messages": [{
"severity": "Info",
"type": "SERVER",
"code": "ASE032LPSCIL744.ATSE.CERT.ASCINT.SABRECIRRUS.COM",
"text": "27035"
}, {
"severity": "Info",
"type": "WORKERTHREAD",
"code": "TRANSACTIONID",
"text": "3623196258955057549"
}, {
"severity": "Info",
"type": "DRE",
"code": "RULEID",
"text": "13292"
}, {
"severity": "Info",
"type": "DEFAULT",
"code": "RULEID",
"text": "25238"
}, {
"severity": "Info",
"type": "SCHEDULES",
"code": "MSG",
"text": "NO FLIGHT SCHEDULES FOR QUALIFIERS USED"
}, {
"severity": "Error",
"type": "IF2",
"code": "PROCESS",
"text": "No complete journey can be built in IF2/ADVJR1."
}, {
"severity": "Error",
"type": "ERR",
"code": "ERR",
"text": "Error during Processing"
}],
"statistics": {
"itineraryCount": 0
}
}
}
Also, tested this using /v1/offers/shop/ in PROD environment using old endpoint and still see the same issue.
Endpoint: https://api.havail.sabre.com/v1/offers/shop,
{
"groupedItineraryResponse": {
"version": "5.2.0",
"messages": [{
"severity": "Info",
"type": "SERVER",
"code": "ASE032LPSPIL9BE.IDM.SGDCPROD.SABRE.COM",
"text": "27041"
}, {
"severity": "Info",
"type": "WORKERTHREAD",
"code": "TRANSACTIONID",
"text": "3629312323318444028"
}, {
"severity": "Info",
"type": "DRE",
"code": "RULEID",
"text": "15943"
}, {
"severity": "Info",
"type": "DEFAULT",
"code": "RULEID",
"text": "17500"
}, {
"severity": "Info",
"type": "SCHEDULES",
"code": "MSG",
"text": "NO FLIGHT SCHEDULES FOR QUALIFIERS USED"
}, {
"severity": "Error",
"type": "IF2",
"code": "PROCESS",
"text": "No complete journey can be built in IF2/ADVJR1."
}, {
"severity": "Error",
"type": "ERR",
"code": "ERR",
"text": "Error during Processing"
}],
"statistics": {
"itineraryCount": 0
}
}
}
Same API call is working fine for other airline codes like Delta Airlines ('DL'), American Airlines ('AA'), United Airlines ('UA'), etc.
Can anyone share any insight on why this is happening and how can we fix this behaviour ?
This error possibly means there’s no flights for this route on WN for this dates.
Try checking WN website and try different dates.
Here's the approach we followed to fix this
In order for us to get southwest airlines(WN) content, the PCC we use has to be whitelisted and southwest airlines(WN) does that by whitelisting using the actual ARC numbers. We have an active ARC number and requested that it be added to the PCC by Sabre as it's already been whitelisted by Southwest. Once Sabre made the changes, the WN content became available for PCC and we could see WN flights being listed when we hit Sabre BFM REST API v4.
FYI - https://developer.sabre.com/guides/travel-agency/concepts/glossary

Pagination in Hapi Fhir

I am facing issue with Hapi Pagination. I want to iterate through all the patients, First I would hit the pater url with _count=200. I see that there are 7344 patients.
http://localhost:8080/smart-pgd-fhir/v2/Patient?_total=accurate&_count=200
Result:
{
"resourceType": "Bundle",
"id": "39e484f7-2159-486a-afc0-b1798d24ec2b",
"meta": {
"lastUpdated": "2022-03-02T11:59:58.286-05:00"
},
"type": "searchset",
"total": 7344,
"link": [
{
"relation": "self",
"url": "http://localhost:8080/smart-pgd-fhir/v2/Patient?_count=200&_total=accurate"
},
{
"relation": "next",
"url": "http://localhost:8080/smart-pgd-fhir/v2?_getpages=39e484f7-2159-486a-afc0-b1798d24ec2b&_getpagesoffset=200&_count=200&_pretty=true&_bundletype=searchset"
}
],<DATA>
After iterating though few pages at _getpagesoffse=2200 I dont see an results. Its return empty.
{
"resourceType": "Bundle",
"id": "39e484f7-2159-486a-afc0-b1798d24ec2b",
"meta": {
"lastUpdated": "2022-03-02T11:59:58.286-05:00"
},
"type": "searchset",
"total": 2200,
"link": [
{
"relation": "self",
"url": "http://localhost:8080/smart-pgd-fhir/v2?_getpages=39e484f7-2159-486a-afc0-b1798d24ec2b&_getpagesoffset=2200&_count=200&_pretty=true&_bundletype=searchset"
}
]
}

Transaction API doesn't work with the payment

Since two weeks we are trying to implement transaction api v3. with Google
payment option. Once we did a transaction the receipt has been displayed.
When we pressed "order" button we got confirmation that the transaction is
being confirmed but in developer Dotpay panel there were no visible
payments.
After a few transactions action stopped displaying the receipt and it
informed that "something went wrong. Try again later". When we removed googlePaymentOption from
TransactionDecision the receipt has been displayed but we were still not
able to make any transactions.
It lasted for a few days and after that we were able to make transactions again but there were
still no payments visible.
Can you please have a look?
Hereby you can find our transaction logs:
{
"conversationToken": "[\"_actions_on_google\",\"podsumowanie\",\"rezerwuj_dostawe\",\"zmien_zamowienie_lista\",\"start_index\",\"modyfikuj_koszyk\",\"dodaj_produkt\"]",
"expectUserResponse": true,
"expectedInputs": [{
"inputPrompt": {
"richInitialPrompt": {
"items": [{
"simpleResponse": {
"textToSpeech": "Transaction Decision Placeholder."
}
}]
}
},
"possibleIntents": [{
"intent": "actions.intent.TRANSACTION_DECISION",
"inputValueData": {
"#type": "type.googleapis.com/google.actions.transactions.v3.TransactionDecisionValueSpec",
"order": {
"merchantOrderId": "9g1blj8rmvo",
"userVisibleOrderId": "9g1blj8rmvo",
"buyerInfo": {
"email": "janedoe#gmail.com",
"firstName": "Jane",
"lastName": "Doe",
"displayName": "Jane Doe"
},
"createTime": "2020-06-09T14:02:08.812Z",
"lastUpdateTime": "2020-06-09T14:02:08.812Z",
"transactionMerchant": {
"id": "book_store_1",
"name": "Book Store"
},
"contents": {
"lineItems": [{
"id": "memoirs_4",
"name": "Our memoirs",
"priceAttributes": [{
"type": "REGULAR",
"name": "Item Price",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}, {
"type": "TOTAL",
"name": "Total Price",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}],
"notes": ["Special introduction by author."],
"purchase": {
"quantity": 1
}
}]
},
"priceAttributes": [{
"type": "SUBTOTAL",
"name": "Subtotal",
"state": "ESTIMATE",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}, {
"type": "DELIVERY",
"name": "Delivery",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN"
},
"taxIncluded": true
}, {
"type": "TAX",
"name": "Tax",
"state": "ESTIMATE",
"amount": {
"currencyCode": "PLN"
},
"taxIncluded": true
}, {
"type": "TOTAL",
"name": "Total Price",
"state": "ESTIMATE",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}],
"followUpActions": [{
"type": "VIEW_DETAILS",
"title": "View details",
"openUrlAction": {
"url": "http://example.com"
}
}, {
"type": "CALL",
"title": "Call us",
"openUrlAction": {
"url": "tel:+16501112222"
}
}, {
"type": "EMAIL",
"title": "Email us",
"openUrlAction": {
"url": "mailto:person#example.com"
}
}],
"termsOfServiceUrl": "http://www.example.com",
"note": "The Memoir collection",
"purchase": {
"status": "CREATED",
"type": "RETAIL",
"returnsInfo": {
"daysToReturn": 1,
"policyUrl": "http://www.example.com"
},
"fulfillmentInfo": {
"id": "FULFILLMENT_SERVICE_ID",
"fulfillmentType": "DELIVERY",
"expectedFulfillmentTime": {
"timeIso8601": "2025-09-25T18:00:00.877Z"
},
"price": {
"type": "REGULAR",
"name": "Delivery Price",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN"
},
"taxIncluded": true
},
"fulfillmentContact": {
"email": "janedoe#gmail.com",
"firstName": "Jane",
"lastName": "Doe",
"displayName": "Jane Doe"
}
},
"purchaseLocationType": "ONLINE_PURCHASE",
"userVisibleStatusLabel": "CREATED"
}
},
"orderOptions": {
"userInfoOptions": {
"userInfoProperties": ["EMAIL"]
}
},
"paymentParameters": {
"googlePaymentOption": {
"facilitationSpec": "{\"apiVersion\":2,\"apiVersionMinor\":0,\"merchantInfo\":{\"merchantName\":\"Frisco\"},\"allowedPaymentMethods\":[{\"type\":\"CARD\",\"parameters\":{\"allowedAuthMethods\":[\"PAN_ONLY\"],\"allowedCardNetworks\":[\"MASTERCARD\",\"VISA\"]},\"tokenizationSpecification\":{\"type\":\"PAYMENT_GATEWAY\",\"parameters\":{\"gateway\":\"dotpay\",\"gatewayMerchantId\":\"705777\"}}}],\"transactionInfo\":{\"totalPriceStatus\":\"FINAL\",\"totalPrice\":\"1.00\",\"currencyCode\":\"PLN\"}}"
}
},
"presentationOptions": {
"actionDisplayName": "PLACE_ORDER"
}
}
}],
"speechBiasingHints": ["$usun", "$dalej", "$events", "$wroc", "$product", "$deleteProduct", "$sztuka", "$dodaj", "$ilosc", "$produkty", "$deleteOrder"]
}],
"responseMetadata": {
"status": {
"message": "Success (200)"
},
"queryMatchInfo": {
"queryMatched": true,
"intent": "777d19a8-c59a-46d2-ae22-212827b5726e"
}
}
} ```
Currently, Google is working with a limited number of partners that can get access to the production Google Pay API. If you're not one of those partners, you're welcome to read the documentation and test the integration using the sandbox environment.
https://developers.google.com/assistant/transactions/physical/dev-guide-physical-gpay
If you are indeed one of these partners, please reach out to your Google contact.

I need receive the messages created in response texts in some intentions of the API.AI

My issue:
I have two responses, but my chat return only one specified "the speech", but i need that return the two, like do the console of api
example of response JSON from API:
{
"id": "XXXXXXXXXXX",
"timestamp": "2017-07-12T20:08:48.101Z",
"lang": "es",
"result": {
"source": "agent",
"resolvedQuery": "Hello how are you?",
"action": "",
"actionIncomplete": false,
"parameters": {},
"contexts": [
{
"name": "intent",
"parameters": {},
"lifespan": 1
}
],
"metadata": {
"intentId": "XXXXXXXXXXXXXXXXXXXXXXXX",
"webhookUsed": "false",
"webhookForSlotFillingUsed": "false",
"intentName": "welcome"
},
"fulfillment": {
"speech": "Hello!",
"messages": [
{
"type": 0,
"speech": "Hello!"
},
{
"type": 0,
"speech": "Bye!"
}
]
},
"score": 1
},
"status": {
"code": 200,
"errorType": "success"
},
"sessionId": ""
}
I need show the black messages.