curl GET json request for more than 100 items - api

I am trying to send a GET request for 300 items.
I am able to get 100 items with this request
curl --request GET --url "https://**/items?limit=100" --header "Content-Type:application/json" >test.json
with the following requests i am able to get 100 items for each page
curl --request GET --url "https://**/items?page=1&limit=100" --header "Content-Type:application/json" >test.json
curl --request GET --url "https://**/items?page=2&limit=100" --header "Content-Type:application/json" >test.json
curl --request GET --url "https://**/items?page=3&limit=100" --header "Content-Type:application/json" >test.json
Is there a solution to get all 300 items in one request and safe them in one file?

You can use either of the following:
curl --request GET --url "https://**/items?page={1,2,3}&limit=100" --header "Content-Type:application/json" >test.json
curl --request GET --url "https://**/items?page=[1-3]&limit=100" --header "Content-Type:application/json" >test.json

Related

How to retrieve warehouse slots with Shippingbo API?

We are using Shippingbo as WMS
I want to retrieve a list of slots for a specific product
So, I tried to request SlotContent: https://app.shippingbo.com/slot_contents?search[product_id__eq]=16794293 but it doesn't work
Is any other solution ?
There is an easy way to do this, you juste have to request the warehouse_slots endpoint
curl --request GET \
--url https://app.shippingbo.com/warehouse_slots?search[product_id__eq][]=21890886 \
--header 'Content-Type: application/json' \
--header 'X-API-TOKEN: ' \
--header 'X-API-USER: ' \
--header 'X-API-USER-ID: ' \
--header 'X-API-VERSION: '

BigCommerce - Find Customers by Tax Code?

Is there a way to find customers with a non-blank tax_exempt_category? I can see that it's a returned value, but I can't see a way to query or filter by it and I don't want to have to process all customers.
Here is a CURL request to get all customers with TAX exempt code "EXeMPT" -
curl --location --request GET 'https://api.bigcommerce.com/stores/[STORE_HASH]/v2/customers?tax_exempt_category=EXeMPT' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Auth-Token: [YOUR_TOKEN]' \ --header 'Authorization: Basic [YOUR_CREDS]'

Paypal API, Curl request, get list of orders of customers

Need a Curl command who can get all transaction_id between two dates.
Exemple :
curl -v -X GET https://api-m.sandbox.paypal.com/v1/reporting/transactions?start_date=2021-12-01T00:00:00-0700&end_date=2021-12-30T23:59:59-0700&transaction_id=XXXXXXXXXXXXX&fields=all&page_size=100&page=1 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer %token%"
But without the transaction_id.
Remove &transaction_id=XXXXXXXXXXXXX from your API call
Preston PHX

curl response is on one line rather than multiple

I used the following curl command to receive tweets as well as info of tweets from a specific account:
curl --request POST \
--url https://api.twitter.com/1.1/tweets/search/fullarchive/production.json \
--header 'authorization: Bearer AAAAAAAAAAAAAAAAAAAAAHzE8wAAAAAATpIskAbraT5V0OSNaWKwrt%2Fz99I%3DcS8seKux26Ic3wcNjpAwPVFJ5I055ZuLyYAQNTMsIx55o1nIK5' \
--header 'content-type: application/json' \
--data '{
"query":"from:TwitterDev lang:en",
"maxResults": "100",
"fromDate":"201802010000",
"toDate":"201802282359"
}'
the response I receive is all on one line, my question is how can I separate the line of response based on each tweet received?

Download exact email data using bounced from API call

How can I get all the data from the bounced emails using API call.
When I use my API call to get data, I only retrieve first 500 records using curl, Can it be possible to get all the data and download in a file.
The command which I am using is as below ... I tried to increase limit of the API call with 501 below was the error ? Can any one let me know how to resolve ?
curl --request GET \
--url https://${API_CALL} \
--header 'accept: application/json' \
--header 'authorization: Bearer ${AUTH_TOKEN}' \
curl --request GET \
--url https://${API_CALL}?limit=501 \
--header 'accept: application/json' \
--header 'authorization: Bearer ${AUTH_TOKEN}' \
{"errors":[{"field":"limit","message":"must be between 0 and 500"}]}