FROM CACHE - en_header

404 error on postRequest

manni497
New Member
1 0 0

Hi,

I'm experiencing an error 404 when I try to request to my API to insert a customer.

 

const client = new Shopify.Clients.Rest(session.shop, session.accessToken);

const data = await client.post({
path: 'customers',
data: { "customer": customerJson },
type: DataType.JSON,
});

 

The customerJson variable contains the Customer object reported at @https://shopify.dev/api/admin-rest/2022-01/resources/customer#resource_object. I'm using October21 API Version and I'm sure that the sintax is correct because the same code works for products.

This is my log:

Received an error response (404 Not Found) from Shopify:
"Not Found"
If you report this error, please include this id: 2fcde470-1814-44bf-ba94-d4c2e07cef22

 Does someone know how to fix?

Reply 1 (1)
websensepro
Shopify Partner
59 2 2

Hey Manni497

Check out this youtube tutorial