Hello Affiliate API Support Team,
I am start to implementing a connection to Affiliate API.
At First, I test "Taxonomy" and "Paginated Items" entry points. When I do request over walmart.io Try API page, with pass the required headers then all works and I get an expected response.
However, when I do the same request with a curl command on my laptop and passing the same headers and params, I get error response
for "Paginated Items" {"errors":[{"code":4008,"message":"Missing itemId"}]}
for "Taxonomy" {"details":{"Description":"Unable to retrieve service related information, please read documentation for mandatory headers or URI specification"}}
For details see, please, debug log below.
Please advice.
Best Regards & Thanks in advance
Serge
Log: Paginated Items
curl --verbose --compressed -H "WM_CONSUMER.ID:X-removed-X" -H "WM_CONSUMER.INTIMESTAMP:1583698692666" -H "WM_SEC.KEY_VERSION:2" -H "WM_SEC.AUTH_SIGNATURE:IBVm1uz8+6uNA6XwJjweUjJRBHavUPCNoTXf6aino0uDN1DWFfSpaZRd+aVeoxdKZKZ2b/fC/gAcZoaBAqD4s6GaqO719d3E//EfLiRUPPB0AxKgpmB2/E6mlv5BPz3Zuds8aubPgruOaDJG8GjbLF4pxsV2AbLTgBV8/XSc2N7RSl/Sv4xyC2YIENRYn+Xclt7seScNq+5tlhvPtXTBCYQ02ocrJJ+TbOcMFNrIhQicQ6nLi/yIvPXjptPLLfYKrJI29AqWaHN1+mEdVK8NhqF8WEAPO897I7eVgTIw76A6XzKgwexf9irSRbjW88UbBsxMTS/xbvZNg51GYMl8YA==" -H "Accept:application/json" "https://developer.api.walmart.com/api-proxy/service/affil/product/v2/items"
* Trying 104.90.152.88...
* TCP_NODELAY set
* Connected to developer.api.walmart.com (104.90.152.88) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=Arkansas; L=Bentonville; O=Wal-Mart Stores, Inc.; CN=prod.walmart.com
* start date: May 17 17:01:36 2019 GMT
* expire date: May 17 17:01:36 2020 GMT
* subjectAltName: host "developer.api.walmart.com" matched cert's "developer.api.walmart.com"
* issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Organization Validation CA - SHA256 - G2
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x56172ba6f6b0)
> GET /api-proxy/service/affil/product/v2/items HTTP/2
> Host: developer.api.walmart.com
> User-Agent: curl/7.58.0
> Accept-Encoding: deflate, gzip
> WM_CONSUMER.ID:X-removed-X
> WM_CONSUMER.INTIMESTAMP:1583698692666
> WM_SEC.KEY_VERSION:2
> WM_SEC.AUTH_SIGNATURE:IBVm1uz8+6uNA6XwJjweUjJRBHavUPCNoTXf6aino0uDN1DWFfSpaZRd+aVeoxdKZKZ2b/fC/gAcZoaBAqD4s6GaqO719d3E//EfLiRUPPB0AxKgpmB2/E6mlv5BPz3Zuds8aubPgruOaDJG8GjbLF4pxsV2AbLTgBV8/XSc2N7RSl/Sv4xyC2YIENRYn+Xclt7seScNq+5tlhvPtXTBCYQ02ocrJJ+TbOcMFNrIhQicQ6nLi/yIvPXjptPLLfYKrJI29AqWaHN1+mEdVK8NhqF8WEAPO897I7eVgTIw76A6XzKgwexf9irSRbjW88UbBsxMTS/xbvZNg51GYMl8YA==
> Accept:application/json
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 400
< accept-ranges: bytes
< content-encoding: gzip
< content-type: application/json;charset=utf-8
< last-modified: Sun, 08 Mar 2020 20:19:03 GMT
< strict-transport-security: max-age=86400
< x-lua-strict-transport-security: max-age=86400
< x-tb: 1
< x-tb-optimization-total-bytes-saved: 0
< wm_svc.env: prod
< wm_svc.name: affil-product
< wm_svc.version: 2.0.0
< date: Sun, 08 Mar 2020 20:19:03 GMT
< vary: Accept-Encoding
< set-cookie: TS01a35e2a=0130aff2324e25bae12799c8f4cf8c303c61b5b1e4b3a9b49b2dc40cd4190d5006c5aeff01fd85aab36fc6024d1cb0b15e79ae0780; Path=/; Secure
<
* Connection #0 to host developer.api.walmart.com left intact
{"errors":[{"code":4008,"message":"Missing itemId"}]}
Log: Taxonomy
curl --verbose --compressed \
> -H "WM_CONSUMER.ID:X-removed-X" \
> -H "WM_CONSUMER.INTIMESTAMP:1583631173218" \
> -H "WM_SEC.KEY_VERSION:2" \
> -H "WM_SEC.AUTH_SIGNATURE:fJ0gfijP2k/Jp8L96xHmJvpHvhVohanxa7f+dzewuvh73jceaoEvpRTZfsybss4Sdn7Ytx7vk/l4k411tb1v6lLfIam8YhNW8niiO9MUxhdd7gjWDXhdsTTSnDrx4vy3eQtIetyz413APz1VZAKCViRJvqE4rh0JETMeY5vtEl6wgjyp1YgMol/t0+mz8y5n9wu4KlBVcE6D3yUxNNPGPzjKAVpxmQTsuw9Lp0awfLhArT74xXdfDUPGoJ72b09MVUtJ0pQsZoYY7WXybUgE2A6vtm80nqzQFEGVWVWoyfVtz0zPvaimQYklkLwUUrW8QimCFWCrpUDBwWVgPptKNQ==" \
> -H "Accept:application/json" \
> "https://developer.api.walmart.com/api-proxy/service/affil/product/taxonomy"
* Trying 104.90.152.88...
* TCP_NODELAY set
* Connected to developer.api.walmart.com (104.90.152.88) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=Arkansas; L=Bentonville; O=Wal-Mart Stores, Inc.; CN=prod.walmart.com
* start date: May 17 17:01:36 2019 GMT
* expire date: May 17 17:01:36 2020 GMT
* subjectAltName: host "developer.api.walmart.com" matched cert's "developer.api.walmart.com"
* issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Organization Validation CA - SHA256 - G2
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x557c4ef856b0)
> GET /api-proxy/service/affil/product/taxonomy HTTP/2
> Host: developer.api.walmart.com
> User-Agent: curl/7.58.0
> Accept-Encoding: deflate, gzip
> WM_CONSUMER.ID:X-removed-X
> WM_CONSUMER.INTIMESTAMP:1583631173218
> WM_SEC.KEY_VERSION:2
> WM_SEC.AUTH_SIGNATURE:fJ0gfijP2k/Jp8L96xHmJvpHvhVohanxa7f+dzewuvh73jceaoEvpRTZfsybss4Sdn7Ytx7vk/l4k411tb1v6lLfIam8YhNW8niiO9MUxhdd7gjWDXhdsTTSnDrx4vy3eQtIetyz413APz1VZAKCViRJvqE4rh0JETMeY5vtEl6wgjyp1YgMol/t0+mz8y5n9wu4KlBVcE6D3yUxNNPGPzjKAVpxmQTsuw9Lp0awfLhArT74xXdfDUPGoJ72b09MVUtJ0pQsZoYY7WXybUgE2A6vtm80nqzQFEGVWVWoyfVtz0zPvaimQYklkLwUUrW8QimCFWCrpUDBwWVgPptKNQ==
> Accept:application/json
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 403
< accept-ranges: bytes
< content-encoding: gzip
< content-type: application/json;charset=utf-8
< last-modified: Sun, 08 Mar 2020 20:20:57 GMT
< strict-transport-security: max-age=86400
< x-lua-strict-transport-security: max-age=86400
< x-tb: 1
< x-tb-optimization-total-bytes-saved: 0
< date: Sun, 08 Mar 2020 20:20:57 GMT
< vary: Accept-Encoding
< set-cookie: TS01a35e2a=0130aff232c50989262fcf9c5dfdc5de56262db0064892983ed98e2f5be77b65d62dcaa0db55c2386de3ea7190f7e3ff64099280bb; Path=/; Secure
<
* Connection #0 to host developer.api.walmart.com left intact
{"details":{"Description":"Unable to retrieve service related information, please read documentation for mandatory headers or URI specification"}}
Found the solution in this chat room: https://gitter.im/IO-support/community
The docs are not up to date / confusing -
Your second URL should be for V2 of the API - in this case, https://developer.api.walmart.com/api-proxy/service/affil/product/v2/taxonomy
Your first URL is indeed to V2, however the names of the input params are different - look at this page for correct inputs - you should pass the mandatory ids
parameter.