I am using a Bigcommerce sandbox account, which is not live yet. Test orders are allowed from backend. Two orders can be seen from admin: order_id 100 and 101. But when I am using Postman to get either one, response is:
{
"status": 500,
"code": 10000,
"title": "Transactions not found for order_id 101. [Internal Code 204]",
"type": "https://developer.bigcommerce.com/api#api-status-codes"
}
My Get call is:
https://api.bigcommerce.com/stores/<mystorehash>/v3/orders/101/transactions
I am using Postman with headers:
X-Auth-Client:<my API client id>
X-Auth-Token: <my Auth token>
I have got these values when I created the API....also there in header:
Accept: application/json
Content-type:application/json
What am I missing?
Related
I'm trying to insert multiple rows in my data extension by using a POST request on postman. I'm using this documentation :https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/postDataExtensionRowsetByKey.html.
Details of my first POST request :
My URL :
https://MY_SUBDOMAIN.auth.marketingcloudapis.com/v2/token
My body (by using the informations of the package created on marketing cloud) :
{
"client_id": "ssd6ssd6ssd6ssd6ssd6ss",
"client_secret": "p3sp3sp3sp3sp3sp3sp3sp3",
"account_id": "7842222",
"grant_type": "client_credentials"
}
I send the request => Status 200 OK
I copy the tokken access.
I create a second POST request.
Tab Authorization, Type = Bearer Token, I paste my token access
Details of my second POST request :
My URL :
https://MY_SUBDOMAIN.rest.marketingcloudapis.com/hub/v1/dataevents/key:EXTERNAL_KEY_OF_MY_DATA_EXTENSION/rowset
My body :
`
Host: https://MY_SUBDOMAIN.rest.marketingcloudapis.com
POST /hub/v1/dataevents/EXTERNAL_KEY_OF_MY_DATA_EXTENSION/rowset
Content-Type: application/json
[
{
"keys":{
"ID_Crawl": "test123"
},
"values":{
"Source": "2013-05-23T14:32:00Z",
"Type_contenu": "no",
"Statut_Notification": "non lu",
"Champ": "20081105",
"Origine_contenus": "test blablablablablablabla",
"Date_crawl": 02/02/2023
}
},
{
"keys":{
"ID_Crawl": "test"
},
"values":{
"Source": "2013-05-23T14:32:00Z",
"Type_contenu": "ok",
"Statut_Notification": "valide",
"Champ": "00000007",
"Origine_contenus": "test blablablablablablabla",
"Date_crawl": "02/02/2023"
}
}
]
I send the request and I had an error message (Status:400 Bad request means that bad synthax):
{"documentation":"https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm","errorcode":0,"message":"Bad Request"}
Does someone know where is my mistake ?
Sorry if it seems that my mistake is a stupid one, I'm completely a beginner in api call
So while trying to test how to create a product, with as minimal data as possible, using the Shopware 6 API i get a Status 204 (No Content) response with an empty response.
When i press "Send" again i get a Status 400 error with this message:
{
"errors": [{
"status": "400",
"code": "CONTENT__DUPLICATE_PRODUCT_NUMBER",
"title": "Bad Request",
"detail": "Product with number \u002212345667891\u0022 already exists.",
"meta": {
"parameters": {
"number": "12345667891"
}
}
}]
}
When i check the Shopware Backend and search for the product, i get no result.
When i try searching the MySQL Product-Tables i get no result aswell.
Iam using this site: https://reqbin.com/
And I call the URL: https://www.my-url.de/api/product via POST Request.
As authorization i use a bearer token i grab from the getToken GET-Request.
My Request-Content looks like the following:
{
"name": "Aarons Testartikel of Doom",
"taxId": "f68a9c3c86864c2ea7597062fc457cf7",
"price": 3,
"productNumber": "12345667891",
"stock": 5,
"active": true
}
The 204 status code you get on your first request indicates that the request was handled successful. According to the HTTP-Standard all 2xx status codes can be considered successful. Shopware by default returns a 204 - No Content with en empty response body to all write requests over the API, but you can provide a _response query parameter to your POST-Request and Shopware will return a 200 response with the same data you'll get if you make a GET-Request to read the data of the added product.
In your case the URL would be https://www.my-url.de/api/product?_response=1.
The reason for the Error on the second request is that the product number needs to be unique, so you can't add another product with the same product number. Changing the product number before you do the second request should work again.
The Error also indicates that the first Write-Request was indeed successful, to make sure that your shopware installation is connected to the Database you think it is, you can check the .env file in the root folder of your installation, there should be a DATABASE_URL variable defined.
I'm trying to access Ebay Attributes for certain categories through API. It was functioning till certain time. Now whenever I try to use getProductMetadataForCategories, it returns Error 75040 The specified category ID is invalid.
I've found here another similar question and there was suggested that this category was remapped.
So I called GetCategoryMappings and GetCategories requests. In GetCategoryMappings response my category is not mentioned, but in GetCategories and it is not a parent category.
I've tried several categories and all of them returns same error.
Web Service URI:
https://api.ebay.com/commerce/catalog/v1_beta/get_product_metadata_for_categories?primary_category_id=86207
HTTP Headers:
Authorization:Bearer token_deleted
Accept:application/json
Content-Type:application/json
Accept-Encoding:application/gzip
X-EBAY-C-MARKETPLACE-ID:EBAY_DE
Response Headers:
content-length:183
content-encoding:gzip
date:Fri, 06 Mar 2020 13:36:44 GMT
nncoection:close
rlogid:t6%60drfojafsl%3C%3Dpiedbqgklbgwj%284%3E3233%3B%2Busqdrrp%2Buk%60%2Bceb%7C%28dlh-170b01002a6-0x133
set-cookie:ebay=%5Esbf%3D%23%5E;Domain=.ebay.com;Path=/
x-ebay-c-request-id:ri=PatSZo8I2Ubk,rci=573f635c2025eb59
x-ebay-c-version:1.0.0
x-ebay-client-tls-version:771, 10.218.89.196
x-ebay-esb-upstream:catalogapi.vip.ebay.com
x-ebay-request-id:170b0100290.a9c4361.571a5.eed858bf!/commerce/catalog/v1_beta/get_product_metadata!10.156.67.97!esbnewesbngcos[]!get_product_metadata_for_categories!slccatalogapi-2907548.stratus.slc.ebay.com!r1catalogapi[ShieldClient[!Ginger.ngrlsvc.v1.POST!slcngrlsvc-3525110.stratus.slc.ebay.com!r1ngrlsvc[]]!SdarsClient[!sdars.v2!slcsdars4-3319875.stratus.slc.ebay.com!r1sdars4[]]]
x-ebay-svc-ep-cookielet:321=0001583501804197
x-ebay-svc-tracking-data:<a>ul=de-DE&uc=77&bs=77&nqt=AA**&!_epec=7,6,8&nqc=AA**</a>
content-type:application/json
connection:keep-alive
strict-transport-security:max-age=31536000
Response Body:
{
"errors": [
{
"errorId": 75040,
"domain": "API_CATALOG",
"category": "REQUEST",
"message": "The specified category ID is invalid.",
"parameters": [
{
"name": "fieldName",
"value": "primary_category_id"
},
{
"name": "fieldValue",
"value": "86207"
}
]
}
]
}
Unfortunately, I have no ideas why it always returns the error.
Has eBay changed something in API calls?
Has anybody seen something similar last days?
Thanks in advance!
The problem is eBay's, not yours.
The documentation suggests https://api.ebay.com/commerce/catalog/v1_beta/get_product_metadata_for_categories?primary_category_id=500&other_applicable_category_ids=34,36,63 but it returns exactly the same error.
Sorry.
I have developed an Python webapp on GCP App Engine.
I want to use OAuth 2.0 client ID as an authentication for my app.
In APIs & Services -> Credentials there is an OAuth 2.0 client ID with my app URL added as Authorized redirect URIs.
My Postman access token configuration looks like the following:
And authorization configuration:
Despite that I am getting following response: Status: 401 Unauthorized
Info from the header: WWW-Authenticate: Bearer, error="invalid_token"
Response body:
{
"code": 16,
"message": "JWT validation failed: Bad JWT format: Invalid JSON in header",
"details": [
{
"#type": "type.googleapis.com/google.rpc.DebugInfo",
"stackEntries": [],
"detail": "auth"
}
]
}
What I am doing wrong? How should I troubleshoot this?
EDIT: Adding request
POST /parse HTTP/1.1
Host: [my_app_name].appspot.com
Content-length: 0
Content-type: application/json
Authorization: Bearer [token_generated_by_postman]
I want to send a POST request with Postman to receive back information from a database with a list of elements.
Case:
On a Home page, I have a search engine when I'm choosing parameters. URL://example.com
I'm clicking button: Display on a list URL://example.com
I'm receiving list with searched elements URL://example.com/Search/Result
Fist Test
Method: Post
URL: example.com
Headers: Content-Type - application/json
Temporary Headers: which include : __RequestVerificationToken
Body:
{
"options": "1",
"IsMember": "false",
"ID": "2",
"btnShowList" : "true"
}
Result:
Status: 200,
But in a body I have HTML of whole home page, so probably post was not executed
Second Test
Method: Post
URL: example.com/Search/Result
Headers: Content-Type - application/json
Temporary Headers: which include : __RequestVerificationToken
Body:
{
"options": "1",
"IsMember": "false",
"ID": "2",
"btnShowList" : "true"
}
Result:
Status: 404, Not Found
Questions:
Is it possible to do the post if in URL is no query parameres?
Any idea how can I write such a test case?
Have anyone writes post method with dynamic parameters such as eg. __RequestVerificationToken
Receiving an HTML in response is totally normal, especially if the technology used is ASP.net WebForms for instance.
To answer some of your questions: It is possible to make a post with no query params. All you need to do is hit the correct url with the expected body