Softlayer API: Is it possible to get a related orderId with the ticketId? - api

What I'm trying to do is to get a related order id after installing security SW through ticket.
Actually I've seen the following API Account-getUpgradeRequests.
SoftLayer_Account::getUpgradeRequests
But this API seems to be appliable to only "Sales" group tickets.
How can I get an related order Id from "Support" group tickets? What API I shoud use?

Well basically, the method returns all the upgrade requests. When you upgrade a device this ticket is created automatically and it contains the orderId for your upgrade request.
The upgrade requests are usually created using the groups: "Hardware" or "Sales".
So, I do not know how your ticket was generated, but If you created manually the ticket with a orderId in the "ticket body" field, the getUpgradeRequests will not list that ticket, and there is not any method which lists that. You could list all the tickets and look up in their body the orderID.

Related

Can retrieve some orders, but not all. using Shopify REST API

Trying to determine why I am not able to retrieve all orders under my test store (so that I can understand what is happening in Production as well)
As you can see above, I have 13 orders placed on my test store, but I can only retrieve 11. The two orders placed in august, that I have marked in red, are not reachable. Even when I try to look them up by searching by their ID's
Requests I am using:
sharing my access token here, its fine. this is just a test store.
X-Shopify-Access-Token: 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
https://vitor-dawn-dev-store.myshopify.com/admin/api/2021-10/orders.json?status=any - gives me the 11 orders
https://vitor-dawn-dev-store.myshopify.com/admin/api/2021-10/orders/count.json?status=any - returns 13 (The number I expected).
https://vitor-dawn-dev-store.myshopify.com/admin/api/2021-10/orders/4062335991963.json - one of the missing order's ID. gives me a 404 Not found.
Some sample IDS:
Valid and reachable order ID sample: 4270842052763
Order ID's that aren't reachable: 4062335991963 and 4062362665115
Also tried through graphQL, but got the same results.
Does anyone know why this is happening?
From the Shopify REST API docs for Orders
Only the last 60 days' worth of orders from a store are accessible
from the Order resource by default. If you want to access older
orders, then you need to request access to all orders. If your app is
granted access, then you can add the read_all_orders scope to your app
along with read_orders or write_orders. Private apps are not affected
by this change and are automatically granted the scope.
Your app needs read_all_orders scope to be able to fetch data for orders created more that 60 days ago.

Retrieve customer related to payment

Anyone know if it's possible to retrieve the customer name related to a transaction from the API?
I see it under "Paid by" if I follow the "payment_url" in the connect v1 https://connect.squareup.com/v1/{{location_id}}/payments/{{payment_id}} endpoint but can't see to find it anywhere else
Background: I'm working on a ticketing system that breaks out items by item_category so a kitchen gets only food items and the bar gets only drink items.
I have queues and itemized tickets by category BUT I can't seem to find the customer's name anywhere
You'll need to utilize the V2 Transactions API. When you call ListTransactions or RetrieveTransaction (ListTransactions), the Transaction object will have an array of Tenders, tenders, which has a field called customer_id. With this id, you will be able to pass it to RetrieveCustomer (RetrieveCustomer) to find out their name. Note that if you're not explicitly filling out their name, the name might not be available (an "instant profile" (Instant Profiles) will be created with whatever information can be retrieve from the card used to pay).
Update: Alternatively, as suggested by #Dan, would be to strip the payment_url from a V1 RetrievePayment (RetrievePayment) which includes the transaction_id at the end of the URL: https://squareup.com/dashboard/sales/transactions/TRANSACTION_ID. This is more efficient as you won't need to loop through transactions, and allow you to send it straight to RetrieveTransaction.

How to retrieve Square orderIds for Call to BatchRetrieveORders

I want to retrieve a list of orders using the Square API. The call to retrieve orders is a POST call with a String array of order_ids however I'm not sure where I can get this information. In the docs they said I can use the ListTransactions endpoint to get this information but I'm not able to find the order_id within the response.
The documentation to retrieve Orders located at: https://docs.connect.squareup.com/api/connect/v2#endpoint-batchretrieveorders
see sample response of ListTransactions: https://docs.connect.squareup.com/api/connect/v2#endpoint-listtransactions
The Orders API does not support listing of orders. To access order
details, you will need to fetch the order's ID by querying
transactions using the ListTransactions and RetrieveTransaction
endpoints, and then fetching the order using the BatchRetrieveOrders
endpoint
Reference: https://docs.connect.squareup.com/articles/orders-api-overview
The goal is to get a list of recent transactions/orders that list out exactly what was purchased. The Transactions model doesn't contain Items whereas the Orders model does.
The Transaction object will include an order_id field if you included it during the Charge request. If you did not pass the order_id to the Charge request, then it will not show up.
Furthermore - just for clarity's sake, if you use Square Point of Sale, or if you haven't included the order_id previously but still would like to view itemizations for transactions, please look at V1 ListPayments which will include it even if there's no order_id.
References:
https://docs.connect.squareup.com/api/connect/v2#type-transaction
https://docs.connect.squareup.com/api/connect/v1#get-payments

Retrieval of all the invoices of particular contact id in xero

In xero, if we create a contact. Using that contact we perform couple of sales invoice and purchase bills and few of them get paid. Now I want to obtain the list of the invoices groupedBy ContactID in php
Xero have recently released functionality that allows this in an easy way.
You can use the ContactIDs query parameter on the invoices endpoint like the following:
GET ../Invoices?ContactIDs=623e392d-7402-40e4-a54c-fdf29783e9a4
You can also do this for more than one ContactID by supplying a comma separated list of ContactIDs.
You can find more information about this in this handy blog post

ebay getOrders API

I am building a .net service to getOrders from ebay. my service runs fine, however I dont know how should I handle data.
For example I am using CreateTimeTo and CreateTimeFrom Filter to return orders from past 24 hours. I save them into my database, now some orders return no Address info.
My question is, Whats the best way to hadnle/update already imported orders into my database. Say for example order imported into my system wa without shiping info, and customer completed shipping info after a week, how would I update that order in my system?
Thanks
I would definitely use modtimefrom modtimeto filter. Ih this way you can get all order that have been modiefied in last "x interval". This way you will get either new orders and modified (checkout complete - paid - shipped) and so on. My favourite filter anyway is NumberOfDays. This one acts as ModTimeFrom/ModTimeTo but is way more simple and you don't have to deal with dates.
An order without address means buyer has not completed checkout (no payment selected so no shipping address as well yet).
Once buyer completes checkout or order is mark as paid the entire address will be avaible.
You can get buyer default address shipping by using call GetSellerTransaction
I hope i understood your question and to be helpful.