When I review the logs for that X-request-id, it is a request being made to GET "/admin/api/2023-04/price_rules.json
So that would make sense that it is returning a list of Price Rules.
Do you have the code for the request that you are trying to make that you would like me to review?
Hi, thanks for your help. I have the same problem and right now. I’m using POST method, my body:
const requestBody = {
price_rule: {
title: ‘TEST10’,
target_type: ‘line_item’,
target_selection: ‘entitled’,
entitled_product_ids: [5419639406749, 8167846412514],
allocation_method: ‘across’,
value_type: ‘percentage’,
value: -10.0,
usage_limit: 1,
starts_at: isoStartDate,
ends_at: isoEndDate,
customer_selection: ‘all’
}
};
the request response is far to big for me to send it here but it’s an array of existing price rules (and my price rule isnt in it), other than that, it’s just typical price rules.
endpoint:
it turns out it only happens when we call the main domain but it doesn’t happen when we call myshopify domain. so probably a bug on the redirection where the POST requests end up turning into GET requests