I'm trying to build an integration for a client between Big Commerce and their ERP system. As part of this, I need to update existing custom fields against products in Big Commerce.
The API reference (https://developer.bigcommerce.com/api-reference/store-management/catalog/product-custom-fields/updatecustomfield) states that this is possible. I have built the integration code to use the exact method described in the API reference but it keeps returning a 422 error which says:
The custom field with the name: xxxxxxxxx & value: yyyyyy already exists.
I don't understand why it would give this error; I know it exists, that's why I'm updating it. If it didn't exist, I would be using the Create Custom Field method instead.
Anyone ever come across this issue before or know why this may be occurring?
Thanks in advance.
I've found the API to be fairly robust, and use the custom_field API a LOT.
Have you done a quick check, via the API to get ALL the custom_fields for the product you are trying to update the custom_field for, and make sure you are updating by the correct custom_field ID? (so, not trying to change a different custom_field, which will then cause this error to be raised?)
Related
I've been working on an automatized eBay-upload-item module for a while now and every time I think it could work, eBay comes up with a new non-sense error. Currently the error is:
SKU already in use
I have 0 items in my listing, (active, ended, unsold etc), literally, 0 items anywhere. And when i try to make a BULK upload via the Trading API using individual AddFixedPriceItemRequest per item (including variations), I get the above error, which makes no sense.
All my SKUs are uniquely generated and then checked for against a database that stores them so as to avoid duplication. There is no documentation anywhere, and just basing my debugging on eBay's error reporting can drive anyone into insanity.
Any help will be much appreciated. Thanks
First of all, make sure that the item you're trying to upload is not a Multi-SKU item. This error can appear for multiple problems related to any part of your listing.
It would be also great if you can post API request and response here.
I am trying to get the data to create the burned down chart from version one.
I came to know there is no standard api's for that.
Here i found that by making multiple call's to fetch todo value for a scope of timebox it is possible.
Is there any better way to do it?
and also let me know any good open source libraries(javascrpt/java) to plot such graph
i tried the way shown here but i am not able to make out what value i am getting.
i tried a get request like
"base URL"/rest-1.v1/Data/Timebox?where=State.Code='ACTV'&asof"11-25-2015"&sel=Name,EndDate,State,Workitems.ToDo.#Sum
but could only get present value but not the past ones.
Thanks in advance
You are using the rest-1.v1/Data endpoint. From this endpoint you will get the current state of assets in your VersionOne instance however, there is an attribute "Prior" which contains the previous state of a VersionOne asset (Timebox). The most robust way to access historical data is though the rest-1.v1/Hist endpoint. You can find details about Hist queries here.
Using your query
"base URL"/rest-1.v1/Hist/Timebox?where=State.Code='ACTV'&asof"2015-11-25T17:30:00.00"&sel=Name,EndDate,State,Workitems.ToDo.#Sum
The asof keyword will return the state of that Timebox at that instance in time. Observe the proper format of the date.
I am creating a C# tool that pulls information from YouTrack using the REST API. I am looking for a way to get a list of the sprints that have been created. Is there a way to easily get this information through the REST API? Worst case I could get the list of issues and parse through all of them to collect all of the available sprints, but there has to be an easier way.
Version 5 changed the agile method. The new agile method is returned with the following command:
{baseUrl}/rest/agile/{agileID}/sprints
I had to get the list of the Agile ID's to use in the above url using the following command:
{baseUrl}/rest/agile/agiles
This now gives a list of all the agile boards and using the 'id' element in the first command above will return the list of sprints for that agile board. The AgileID's are returned something like 'myprojectname-99'. I found that if you just use the numeric number at the end of the ID, that will also work instead of using the full agile name.
I found a much simpler way to get the sprints:
{baseUrl}/rest/agile/{projectName}/sprints?"
This gives an XML with all of the sprints for that project and their start/end dates.
What you request can be obtained by GET {youtrac.base.url}/rest/admin/customfield/versionBundle/{bundleName}. To find out {bundleName}, go to agile settings and have a look at 'Field to identify sprints:' setting which gives you the field name. For this field, in Administration you can locate the name of the bundle.
{baseUrl}/rest/agile/{projectName}/sprints? is only working if the name of the agile board is the same as the projectName!!!
The API is: {baseUrl}/rest/agile/{agileName}/sprints?
Using the Shopify API, is there a way to creation promotions for your store? If not, is there a way to programmatically create promotions in Shopify? (short of using CURL posts to the admin)
That is, I can create a promotion by hand using the admin and navigating to the Promotions and clicking the Add a discount code link. I'd like to be able to do the same thing programmatically, or to know for certain this isn't possible. I don't see any obvious method on the api list, but it seems like something should be an API method.
Unfortunately they don't allow it... I resorted to creating an interface to do so, though:
https://github.com/MartinAmps/Shopify-Private-APIs
Hope it helps
Edit
I also created a blog post about it.
There is no way to create discounts via the API.
If you want we have made an application that can be used to create discount codes.
Otherwise you can use a tool like Mechanize to automate coupon creation for you, but keep in mind theres a good chance that any time in the future it will break since we don't make any promises to keep our admin the same in the future. Any changes have a good chance of breaking whatever script you'd end up writing.
The Price Rules API is now public and allow any app to create price rules and discount codes.
https://help.shopify.com/api/price-rules
If you're familiar with Rails or you're already using ActiveResource for your Shopify API calls, then you can drop in this modified version of Discount < ActiveResource::Base https://gist.github.com/choonkeat/09a56da222f506e627c5
Has anyone used Commission Junction's Product Catalog Search API for searching/fetching local deals? (BuyWithMe and KGBDeals post their deals to CJ)
There is a Yipit clone out there which uses this API. This clone was unable to categorize deals properly based on location. I was supposed to fix this issue. The problem I saw is: API's response does not contain location/city info. Therefore, deals cannot be categorized based on cities. This basically kills the purpose of local deals.
I am looking for advice from anyone who has done similar work using CJ API. May be I am missing something.
OneBigPlanet has an All-In-One API filled with all affiliate networks and daily deal providers for U.S & Canada
If you are going to use a deal aggregator API for your site/blog, you may want to take a look at this one as well.
SideBuy has recently released its version 1 API which lets the user (like yourself) connect to its comprehensive set of daily deals using several parameters to fully customize the listings. I suggest you check it out and get in touch in SideBuy's site if you need further assistance.
Disclaimer: I work for sidebuy.com.