I'm trying to get SyncCentric to work with a legacy Classic ASP site that is currently using Amzpecty.
Any help would be greatly appreciated! Thanks
The cURL request should be:
curl "https://app.synccentric.com/api/v3/products" \
-H "Authorization: Bearer your-api-token" \
-d "identifiers[0][identifier]=B00YECW5VM" \
-d "identifiers[0][type]=asin" \
-d "identifiers[1][identifier]=B00USV83JQ" \
-d "identifiers[1][type]=asin" \
-XPOST
The ASP code I was going to use is below, but I have no idea how to convert the cURL request into the data string:
Dim http: Set http = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
Dim url: url = "https://app.synccentric.com/api/v3/products"
Dim data: data = ""
With http
Call .Open("POST", url, False)
Call .SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
Call .SetRequestHeader("Authorization", "My API key")
Call .Send(data)
End With
If Left(http.Status, 1) = 2 Then
'Request succeeded with a HTTP 2xx response, do something...
Else
'Output error
Call Response.Write("Server returned: " & http.Status & " " & http.StatusText)
End If