I'm currently migrating a website from BigCommerce Stencil to Gatsby and the Stencil version uses the catalog price object to check for product.price.with_tax and fetch product.price.tax_label in case the price excludes tax.
On the backend, the option is set on Store Setup > Tax > Manual Tax > Edit > Configure Tax Options > Tax Label.
I managed to find is_price_entered_with_tax on the API Reference but the only mention to the tax_label value is on the catalog price object.
Is there any way to access that value using v2 or v3 APIs?
Sounds like an interesting project!
You can access the Tax Label value using the server-to-server Checkout API. It will be surfaced as the "name" property in the taxes array:
"taxes": [
{
"name": "This is the Tax Label",
"amount": 1.50
}
]
Related
I already have a working FedEx API in production with two services: rate and shipping.
Note that I use:
My own packages: "PackagingType": "YOUR_PACKAGING"
Almost always I know estimated weight of parcel: "RequestedPackageLineItems": { "Weight": { "Value": "42" } }
So, I do rate&buy label with concrete price. But sometimes package exceeds dimensions or weight is changed after buying label – this leads to additional payments and total price for label is different in real life than i receive at the moment of buying label.
The question is: How can I get REAL weight and price of sent package?
I tried to use tracking service with no luck – API returns old incorrect data of weight and no price.
For example, I know that label 123456789012 was created with 2 lbs of weight with price 9.45$. Later on, weight changed dramatically (to 48 lbs) and price changed to 48.98$. I know that because of talking with real people but request to tracking service of FedEx API says that PackageWeight is still 2 LB and Payments parameter contains only "Type": "SHIPPER_ACCOUNT" value and that's all.
Okay, I've found out that i need to request invoices because they contain needed information. How to get them? Didn't find any documentation inside PDF for developers.
For the Amadeus self-service rest APIs: v1/shopping/flight-offers and flight-dates, is the price.total response field inclusive of all taxes and fees?
I seem to need to add total + totalTaxes to get a price that's close to the one provided by the airline directly.
If there are developer docs that explain in more detail each response field, please do point me to them. I have been unable to find any.
In reference to these APIs:
https://developers.amadeus.com/self-service/category/203/api-doc/4/api-docs-and-example/10002
https://developers.amadeus.com/self-service/category/203/api-doc/5/api-docs-and-example/10003
and this field:
"price": {
"total": "259.91",
"totalTaxes": "185.91"
},
“total” is the total price you will have to pay, it includes the totalTaxes.
You can access the model directly on Swagger (under the Response Class (Status 200)) you have the Model button. But you are right the description of those parameters need to be added, point taken.
As highlighted in the accepted answer, the total price is the total including all taxes, personally, I was also initially confused and had to manually check with a travel agent to confirm. I would suggest Amadeus splits the description as follows
"price": {
"totalFare": "74.00",
"totalTaxes": "185.91"
"totalAmount": "259.91"
},
I want to do the integration Shopify to NetSuite.In the enter image description here giving the detail of my payouts api and response data.using that payout id I want pull the customer for that payout to generate the Netsuite deposit record against that customer which is already present in Netsuite account.please suggest me using that id how and which API needs to call to get the customer.
Following is my Response using API
GET/admin/shopify_payments/payouts.json?status=paid
Response :
{
"payouts": [
{
"id": 23420993582,
"status": "paid",
"date": "2019-01-29",
"currency": "USD",
"amount": "46050.05",
"summary": {
"adjustments_fee_amount": "0.00",
"adjustments_gross_amount": "20.62",
"charges_fee_amount": "1122.23",
"charges_gross_amount": "48097.76",
"refunds_fee_amount": "0.00",
"refunds_gross_amount": "-946.10",
"reserved_funds_fee_amount": "0.00",
"reserved_funds_gross_amount": "0.00",
"retried_payouts_fee_amount": "0.00",
"retried_payouts_gross_amount": "0.00"
}
}
]
}
enter image description here
This means that you have one payout with id 23420993582. What you need to do now is lookup all the transactions related to this payout. These are available at the following resource:
GET/admin/shopify_payments/payouts/23420993582/transactions.json
This will return a property in the response called transactions which is an array of all the transactions with a payout_id of 23420993582. The first entry (index 0) is not a sales transaction -- it is a summary of the payout (note the type).
You can iterate of this array and use the source_order_id of each object to lookup the original order. In that order is where you will find the customer. Note the type of each item in the array. You will see charge, refund, payout, etc).
I also use NetSuite and for me, I was not really interested in finding the customer but rather the order_id. Since my NetSuite cash sales and refunds have the order_id on them (when they are created) i can match up existing sales and refunds to the NetSuite deposit. When you link the NetSuite transaction (in payment sublist of the deposit record)
Any discrepancies (commissions to shopify, etc) I log in the "other deposits" or "cash back" area of the NetSuite deposit.
Because the NetSuite deposit should have the exact same amount it is wise to total up the NetSuite transaction amount AND the shopify transaction amount. They should be the same, but things like currency conversion or edits or mistakes can cause the totals to be different and any difference will cause the deposit to not be saved.
If you have any discrepancy in the totals then programmatically create an additional cash back / other deposit entry to offset it.
if you have something to fix it is now clear in the transaction. You can always delete a deposit and redo it after fixing.
With the legacy API, I can obtain product variant prices for productId 100 with the following:
https://something.com/api/v2/products/100/skus.json
But in the Stencil documentation for Product, there is no price property for a product attribute SKU, and the available properties that are available are limited vs the legacy API.
With product:
"values": [
{
"label": "Hardcover",
"id": 98,
"data": "Hardcover",
"selected": false
},
{
"label": "Paperback",
"id": 100,
"data": "Paperback",
"selected": false
}
],
From what I can gather, the variant pricing is only available via cart.items, but I need to display the prices before the user places an item in the cart.
Is there a way to get product variant pricing/info without using the cart.items object? Thanks!
I'm not aware of a way to do this via a stencil object.
On the product detail page I check if a product has_options, then make ajax calls to the variant URLs to get their prices to create a price range before the user selects their variants. This is pretty necessary when the vendor has huge price differences in variants.
ex.) "From $49.99 - $499.99" instead of "$49.99" default functionality.
I don't have a resolution for category pages as it doesn't make sense to make AJAX requests for each variant of each item on the category page on load. Once Stencil adds support for custom fields on the category page, you could add the child's prices to a parent SKUs custom field and perform some logic for whatever your trying to accomplish.
I don't know when custom fields will be available on the category page but I know they are working on it.
What's the best way to retrieve all products from a Smart Collection through Shopify API?
Thanks!
Update: API version 2020-04
See Codesmith's answer below. As of API version 2020-04, you can now use a smart collection id with the collections endpoint:
GET /admin/api/2020-04/collections/{collection_id}/products.json
See the Collection API docs for more info.
Pre-2020 solution
From the SmartCollection page in the Shopify API docs:
Smart Collections also use collects to connect a product to that smart collection.
And on the Collects page:
List only collects for a certain collection
GET /admin/collects.json?collection_id=841564295
HTTP/1.1 200 OK
{
"collects": [
{
"collection_id": 841564295,
"created_at": "2014-05-23T14:16:47-04:00",
"featured": false,
"id": 1071559648,
"product_id": 921728736,
"sort_value": "0000000001",
"updated_at": "2014-05-23T14:16:47-04:00",
"position": 1
},
...
]
}
The collects contain the product_ids for each of the products in the collection with the specified collection_id.
2020 Update,
For the latest API (2020-04 as of now), you can simply use the /collections/ endpoint, using the Smart Collection ID:
GET https://<shopname>.myshopify.com/admin/api/2020-04/collections/<smart collection id>/products.json
More details can be found in Shopify's Collection API Docs.