BigCommerce storefront apis for order - bigcommerce

Where is the documentation for /api/storefront/orders/*?
I was expecting to find it on this page.
https://developer.bigcommerce.com/api-docs/cart-and-checkout/working-sf-apis
Specifically, the documentation that would cover /api/storefront/orders/:order-id
and cover the valid inputs to the querystring. I know you can pass include, with one or more of the values as a comma separated string
payments
lineItems.physicalItems.socialMedia
lineItems.physicalItems.options
lineItems.digitalItems.socialMedia
lineItems.digitalItems.options
Edit
The checkout stencil context object used on theme\templates\pages\order-confirmation.html has this schema
{
"order_confirmation_content": "goes in the body",
"checkout_head": "goes in the head",
"order": {
"id": 206
},
"header_image": "for an img src attribute"
}

The documentation for the storefront orders API can be found here:
https://developer.bigcommerce.com/api-reference/orders/storefront-orders-api/order/ordersbyorderidget
However, as you mentioned, there are a few query parameters that are undocumented. Those are not officially supported, and they might be subject to change in the future. This is a case where our position is to hold off on documenting the API parameters until we've determined long-term support. Hope that helps to provide some context!

Related

How to listen to Tweets that only contains geo-info from Twitter stream

I'm trying to use version 2 of the Twitter API to achieve the goal described in the title. Here's what I have tried so far:
Listening to sample stream (1% of Twitter's stream): Almost all the returned Tweets don't have geo-info when following this approach. And it makes sense, since only 0.85% of all Tweets have geo-info.
Listening to a filtered stream with only one rule setup, namely the has:geo rule. But it's returning the following 2 errors:
"Reference to invalid operator 'has:geo'. Operator is not available in current product or product packaging. Please refer to complete available operator list at https://developer.twitter.com/en/docs/twitter-api/enterprise/rules-and-filtering/operators-by-product. (at position 5)".
"has/is/lang/sample cannot be used as a standalone operator (at position 1)".
Here's the rule I'm adding to the stream:
[
{
"value": "has:geo",
"tag": "contains geo-info",
},
]
I need help in solving both shown errors, or a suggestion describing a third different approach.
I see this question has been discussed on the Twitter Community forum: https://twittercommunity.com/t/how-to-listen-to-tweets-that-only-contains-geo-info-from-twitter-stream/162905/2
Short answer:
The has:geois one of several query operators that can not be used in a standalone fashion, and must be paired with keywords and other non-boolean operators.
The has:geo operator is only available in academic and paid packages.

Shopware 6 Store-API set newsletter recipient tags

I'm trying to add a newsletter recipient through store-api, which works. But when I try to add a tag inside the request, it fails. The documentation states that it is possible to add a tag as a string to the request, see here
My request looks like the following:
POST /store-api/newsletter/subscribe
{"option":"subscribe","email":"email#email.com","storefrontUrl":"http://myhost.test","tags":"men"}
I also tried to make the tags value an array, but this doesn't work either...
So my question is: how do I add a tag to the newsletter recipient through the store api?
As of Version 6.4.3.0 this seems not possible.
I tried the same request as you, as well as
"tags":["men"]
and
"tags":["uuidOfExistingTagGoesHere"]
all does not work.
Also the doc block for tags is wrong (it says "zip code" instead of a useful description).
In addition I tried to assign existing tags - this is what works via the admin API:
"tags": [
{
"id": "80df380188364f3c9bbaaa4d6b993dbd"
},
{
"id": "108428f0a37c4d11a66976adc5337c23"
}
]
Which still returns
"code": "FRAMEWORK__WRITE_MALFORMED_INPUT",
"title": "Bad Request",
"detail": "Expected data to be array.",
Also looking at the code there currently seems no handling of the tags. As far as I understand it, the tags would needed to be created on the fly
A possible fix would be the following code:
if (isset($data['tags']) { // inserted that lines
$data['tags'] = $data['tags']->all();
} // end inserted lines
$data = $this->completeData($data, $context);
Using that line, the last mentioned request works (you could then use the IDs of existing newsletter recipient tags).
Of course in this case the API docs have to be adapted.
TL;DR
In my opinion, this seems a flaw in the current Store API implementation.
I would suggest to create an issue on the Shopware 6 issue tracker.

Acumatica - Filter Generic Inquiry via REST

Trying to use this Generic Inquiry's REST API, I am able to retrieve all records though would like to filter them.
Can retrieve all data with PUT {{baseUrl}}/RawDataForReport?$expand=Result with an empty body request.
When I added a field Period to filter it's only showing the first row.
An empty request body also shows the first row when I added Period.
I am not at all familiar Acumatica any useful resources would be greatly appreciated.
To filter the Generic Inquiry result with REST API you need to add the filtering parameter to the GI itself. For instancce, you have your period filter defined in the Generic Inquiry. You can define more filters the same way.
You can learn about designing GIs here: https://openuni.acumatica.com/courses/reporting/s130-inquiries-reports-and-dashboards/
Another option would be to use OData instead of REST API. in that case you would be able to use $filter parameter to filter data.
You can read more about it here:
https://help-2020r2.acumatica.com/Help?ScreenId=ShowWiki&pageid=36beb9aa-f04d-4f63-a93b-a00b1c315be0
https://help-2020r2.acumatica.com/Help?ScreenId=ShowWiki&pageid=5d97a93d-45e0-466e-ba5e-77e1ccf96643
I've been struggling to find a solution to the same problem.
I just figured it out with the help of this stack overflow post.
Acumatica run Generic Inquiry via REST API
Take a look at the last response (not the accepted answer).
Basically when you define your object in the Web Service Endpoint screen, you can define the filters (Use Populate -> Filters). these are the Parameters for the GI.
You define the results the same as you have it.
Then in your PUT request body pass the parameters.
Example:
{
"Param1": {
"Value": "Value1"
},
"Param2": {
"Value": "Value2"
}
I just tested this with Postman, and it works well.

Select shop type using Shopify API

I'm a developer who uses Shopify Developer API. I searched API, trying to find method to retrieve information about shop business industry.
I didn't find anything. I've tried to get this information from Metafield API from store, but I've found just information about pos_attributes.
Could you help me to solve this issue? (In general, is it possible or not?)
Unfortunately that is not possible. The information you've shown is only for Shopify to tailor some stuff for your usage and it is no where linked to your account in the accessible fields.
Fortunately, you can always add custom meta-fields (information fields) to the Shopify store using the Metafield API and retrieve it at anytime anywhere.
Use the Metafield API to POST the following information directly on the store url - https://your_store_name.myshopify.com/admin/metafields.json
{
"metafield": {
"namespace": "meta", //any string will work
"key": "industry", //any string will work
"value": "Leather Manufacturing", // A string or a number
"value_type": "string" //accepted values are string & integer
}
}
Once stored, you can call it on the shop using Metafield object property. {{ shop.metafields.namespace.key.}} (in this case {{ shop.metafields.meta.industry }})
And if you want to call it using the API use GET with the url - https://your_store_name.myshopify.com/admin/metafields/metafield_id.json

Is it possible for me to get products that are discounted via Amazon's API?

I want to search Amazon's product API for discounted products (30% off or more). Is there a simple way to do this via the API?
For certain search indexes, you can ask for minimum percentage off:
http://docs.amazonwebservices.com/AWSECommerceService/2011-08-01/DG/USSearchIndexParamForItemsearch.html
For instance, if I'm searching for Toys, I can get the minimum percentage off with the following parameters:
{"SearchIndex": "Toys", "Service": "AWSECommerceService", "AWSAccessKeyId": "xxx", "Timestamp": "2011-12-26T05:41:20Z", "Version": "2009-11-02", "Keywords": "Halo", "AssociateTag": "xxx", "MinPercentageOff": 30, "Operation": "ItemSearch", "ResponseGroup": "Large"}
However, if I'm searching for video games, the "MinPercentageOff" parameter is ignored. The documentation page I included above shows which of the search indices accept this parameter - note that if the index doesn't support it it's simply ignored (the search doesn't fail, it just doesn't honor that parameter).
Yes you can quite easily, I ran the API and put a break point and looked down into the attributes and found what your looking for...
For the percentage discount you can find it here:
item->Offers->offersField->offerListingField->percentageSaved
For the price of the item its talking about you can find it here:
item->Offers->offersField->offerListingField->Price->formattedPriceField