Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@commercelayer/cli-plugin-resources
Advanced tools
Commerce Layer CLI Resources plugin
commercelayer COMMAND
commercelayer [COMMAND] (--help | -h) for detailed information about plugin commands.
To install as a Commerce Layer CLI plugin run the following command:
$ commercelayer plugins:install resources
commercelayer all RESOURCE
commercelayer create RESOURCE
commercelayer delete RESOURCE [ID]
commercelayer doc RESOURCE
commercelayer fetch PATH [ID]
commercelayer get RESOURCE [ID]
commercelayer list RESOURCE
commercelayer patch RESOURCE [ID]
commercelayer post RESOURCE
commercelayer ra RESOURCE
commercelayer rc RESOURCE
commercelayer rd RESOURCE [ID]
commercelayer res:all RESOURCE
commercelayer res:args
commercelayer res:create RESOURCE
commercelayer res:delete RESOURCE [ID]
commercelayer res:doc RESOURCE
commercelayer res:fetch PATH [ID]
commercelayer res:filters
commercelayer res:get RESOURCE [ID]
commercelayer res:list RESOURCE
commercelayer res:retrieve RESOURCE [ID]
commercelayer res:update RESOURCE [ID]
commercelayer resources
commercelayer resources:all RESOURCE
commercelayer resources:args
commercelayer resources:create RESOURCE
commercelayer resources:delete RESOURCE [ID]
commercelayer resources:doc RESOURCE
commercelayer resources:fetch PATH [ID]
commercelayer resources:filters
commercelayer resources:get RESOURCE [ID]
commercelayer resources:list RESOURCE
commercelayer resources:retrieve RESOURCE [ID]
commercelayer resources:update RESOURCE [ID]
commercelayer retrieve RESOURCE [ID]
commercelayer rf PATH [ID]
commercelayer rg RESOURCE [ID]
commercelayer rl RESOURCE
commercelayer rr RESOURCE [ID]
commercelayer ru RESOURCE [ID]
commercelayer update RESOURCE [ID]
commercelayer all RESOURCE
Fetch all resources.
USAGE
$ commercelayer all [RESOURCE] -o <value> [-i <value>] [-u -j] [-l curl|node [--doc | -R]] [--curl ]
[--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-s <value>] [-x <value> | -X
<value>] [-D ,|;|||TAB [-C -f <value>]] [-H <value> ] [-b] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
FLAGS
-C, --csv export fields in csv format
-D, --delimiter=(,|;|||TAB) the delimiter character to use in the CSV output file (one of ',', ';', '|', TAB)
-H, --header=<value>... rename column headers defining a comma-separated list of values field:"renamed title"
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-b, --blind execute in blind mode without prompt and progress bar
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resourceType/]field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch all resources
ALIASES
$ commercelayer all
$ commercelayer ra
$ commercelayer res:all
EXAMPLES
$ commercelayer resources:all customers -f id,email,customer_group -i customer_group -s updated_at
$ cl res:all customers -i customer_group -f customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"
$ cl all customers -s -created_at --json
commercelayer create RESOURCE
Create a new resource.
USAGE
$ commercelayer create [RESOURCE] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc | -R]]
[--curl ] [--node ] [-H ] [-O ] [-O <value>] [-D <value> | -a <value> | -r <value> | -m <value> | | --load-args
<value> | --save-args <value>]
ARGUMENTS
RESOURCE the resource type
FLAGS
-D, --data=<value> the data file to use as request body
-H, --headers show response headers
-O, --headers-only show only response headers
-O, --object=<value>... define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=<value>... define a resource attribute
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-m, --metadata=<value>... define a metadata attribute or a set of metadata attributes
-o, --organization=<value> (required) the slug of your organization
-r, --relationship=<value>... define a relationship with another resource
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
create a new resource
ALIASES
$ commercelayer create
$ commercelayer rc
$ commercelayer res:create
$ commercelayer post
EXAMPLES
$ commercelayer resources:create customers -a email=user@test.com
$ clayer res:create customers -a email="user@test-com" -r customer_group=customer_groups/<customerGroupId>
$ cl create customers -a email=user@test.com -m meta_key="meta value"
$ cl rc customers -D /path/to/data/file/data.json
commercelayer delete RESOURCE [ID]
Delete an existing resource.
USAGE
$ commercelayer delete [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
delete an existing resource
ALIASES
$ commercelayer delete
$ commercelayer rd
$ commercelayer res:delete
EXAMPLES
$ commercelayer resources:delete customers/<customerId>
$ cl delete customers <customerId>
commercelayer doc RESOURCE
Open the default browser and show the online documentation for the resource.
USAGE
$ commercelayer doc [RESOURCE] [-p object|create|retrieve|list|update|delete]
ARGUMENTS
RESOURCE the resource for which you want to access the online documentation
FLAGS
-p, --page=<option> the doc page you want to access
<options: object|create|retrieve|list|update|delete>
DESCRIPTION
open the default browser and show the online documentation for the resource
ALIASES
$ commercelayer res:doc
$ commercelayer doc
EXAMPLES
$ commercelayer resources:doc customers
$ cl res:doc customers
$ cl doc customers -p create
commercelayer fetch PATH [ID]
Retrieve a resource or list a set of resources.
USAGE
$ commercelayer fetch [PATH] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-x <value> | -X <value>] [-e
<value> | ] [-w <value>] [-p <value>] [-n <value>] [-s <value>]
ARGUMENTS
PATH path (or URL) of the resource(s) to fetch
ID resource id
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
retrieve a resource or list a set of resources
ALIASES
$ commercelayer fetch
$ commercelayer res:fetch
$ commercelayer rf
EXAMPLES
$ commercelayer resources:fetch customers
$ commercelayer res:fetch customers
$ clayer res:fetch customers/<customerId>
$ cl fetch customers/<customerId>/<customerRelationship>
$ cl fetch customers/{customerId}/orders aBcdEkYWx
commercelayer get RESOURCE [ID]
Retrieve a resource or list a set of resources.
USAGE
$ commercelayer get [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-p <value>] [-n
<value>] [-s <value>] [-x <value> | -X <value>] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
retrieve a resource or list a set of resources
ALIASES
$ commercelayer get
$ commercelayer res:get
$ commercelayer rg
EXAMPLES
$ commercelayer resources:get customers
$ commercelayer res:get customers
$ clayer res:get customers/<customerId>
$ cl get customers <customerId>
commercelayer list RESOURCE
Fetch a collection of resources.
USAGE
$ commercelayer list [RESOURCE] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc | -R]]
[--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-p <value>] [-n <value>]
[-s <value>] [-x <value> | -X <value>] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch a collection of resources
ALIASES
$ commercelayer list
$ commercelayer rl
$ commercelayer res:list
EXAMPLES
$ commercelayer resources:list customers -f id,email,customer_group -i customer_group -s updated_at
$ cl res:list customers -i customer_group -f customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"
$ cl list customers -p 5 -n 10 -s -created_at --raw
commercelayer patch RESOURCE [ID]
Update an existing resource.
USAGE
$ commercelayer patch [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [-H ] [-O ] [-O <value>] [-D <value> | -a <value> | -r <value> | [-m <value> | -M <value>]
| | | --load-args <value> | --save-args <value>]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to update
FLAGS
-D, --data=<value> the data file to use as request body
-H, --headers show response headers
-M, --metadata-replace=<value>... define a metadata attribute and replace every item already presente in the remote
resource
-O, --headers-only show only response headers
-O, --object=<value>... define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=<value>... define a resource attribute
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-m, --metadata=<value>... define a metadata attribute and merge it with the metadata already present in the
remote resource
-o, --organization=<value> (required) the slug of your organization
-r, --relationship=<value>... define a relationship with another resource
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
update an existing resource
ALIASES
$ commercelayer update
$ commercelayer ru
$ commercelayer res:update
$ commercelayer patch
EXAMPLES
$ commercelayer resources:update customers/<customerId> -a reference=referenceId
$ commercelayer res:update customers <customerId> -a reference_origin="Ref Origin"
$ cl update customers/<customerId> -m meta_key="meta value"
$ cl ru customers <customerId> -M meta_key="metadata overwrite
$ clayer update customers <customerId> -D /path/to/data/file/data.json
commercelayer post RESOURCE
Create a new resource.
USAGE
$ commercelayer post [RESOURCE] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc | -R]]
[--curl ] [--node ] [-H ] [-O ] [-O <value>] [-D <value> | -a <value> | -r <value> | -m <value> | | --load-args
<value> | --save-args <value>]
ARGUMENTS
RESOURCE the resource type
FLAGS
-D, --data=<value> the data file to use as request body
-H, --headers show response headers
-O, --headers-only show only response headers
-O, --object=<value>... define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=<value>... define a resource attribute
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-m, --metadata=<value>... define a metadata attribute or a set of metadata attributes
-o, --organization=<value> (required) the slug of your organization
-r, --relationship=<value>... define a relationship with another resource
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
create a new resource
ALIASES
$ commercelayer create
$ commercelayer rc
$ commercelayer res:create
$ commercelayer post
EXAMPLES
$ commercelayer resources:create customers -a email=user@test.com
$ clayer res:create customers -a email="user@test-com" -r customer_group=customer_groups/<customerGroupId>
$ cl create customers -a email=user@test.com -m meta_key="meta value"
$ cl rc customers -D /path/to/data/file/data.json
commercelayer ra RESOURCE
Fetch all resources.
USAGE
$ commercelayer ra [RESOURCE] -o <value> [-i <value>] [-u -j] [-l curl|node [--doc | -R]] [--curl ]
[--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-s <value>] [-x <value> | -X
<value>] [-D ,|;|||TAB [-C -f <value>]] [-H <value> ] [-b] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
FLAGS
-C, --csv export fields in csv format
-D, --delimiter=(,|;|||TAB) the delimiter character to use in the CSV output file (one of ',', ';', '|', TAB)
-H, --header=<value>... rename column headers defining a comma-separated list of values field:"renamed title"
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-b, --blind execute in blind mode without prompt and progress bar
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resourceType/]field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch all resources
ALIASES
$ commercelayer all
$ commercelayer ra
$ commercelayer res:all
EXAMPLES
$ commercelayer resources:all customers -f id,email,customer_group -i customer_group -s updated_at
$ cl res:all customers -i customer_group -f customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"
$ cl all customers -s -created_at --json
commercelayer rc RESOURCE
Create a new resource.
USAGE
$ commercelayer rc [RESOURCE] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc | -R]]
[--curl ] [--node ] [-H ] [-O ] [-O <value>] [-D <value> | -a <value> | -r <value> | -m <value> | | --load-args
<value> | --save-args <value>]
ARGUMENTS
RESOURCE the resource type
FLAGS
-D, --data=<value> the data file to use as request body
-H, --headers show response headers
-O, --headers-only show only response headers
-O, --object=<value>... define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=<value>... define a resource attribute
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-m, --metadata=<value>... define a metadata attribute or a set of metadata attributes
-o, --organization=<value> (required) the slug of your organization
-r, --relationship=<value>... define a relationship with another resource
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
create a new resource
ALIASES
$ commercelayer create
$ commercelayer rc
$ commercelayer res:create
$ commercelayer post
EXAMPLES
$ commercelayer resources:create customers -a email=user@test.com
$ clayer res:create customers -a email="user@test-com" -r customer_group=customer_groups/<customerGroupId>
$ cl create customers -a email=user@test.com -m meta_key="meta value"
$ cl rc customers -D /path/to/data/file/data.json
commercelayer rd RESOURCE [ID]
Delete an existing resource.
USAGE
$ commercelayer rd [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
delete an existing resource
ALIASES
$ commercelayer delete
$ commercelayer rd
$ commercelayer res:delete
EXAMPLES
$ commercelayer resources:delete customers/<customerId>
$ cl delete customers <customerId>
commercelayer res:all RESOURCE
Fetch all resources.
USAGE
$ commercelayer res:all [RESOURCE] -o <value> [-i <value>] [-u -j] [-l curl|node [--doc | -R]] [--curl ]
[--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-s <value>] [-x <value> | -X
<value>] [-D ,|;|||TAB [-C -f <value>]] [-H <value> ] [-b] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
FLAGS
-C, --csv export fields in csv format
-D, --delimiter=(,|;|||TAB) the delimiter character to use in the CSV output file (one of ',', ';', '|', TAB)
-H, --header=<value>... rename column headers defining a comma-separated list of values field:"renamed title"
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-b, --blind execute in blind mode without prompt and progress bar
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resourceType/]field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch all resources
ALIASES
$ commercelayer all
$ commercelayer ra
$ commercelayer res:all
EXAMPLES
$ commercelayer resources:all customers -f id,email,customer_group -i customer_group -s updated_at
$ cl res:all customers -i customer_group -f customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"
$ cl all customers -s -created_at --json
commercelayer res:args
Show all the saved command arguments.
USAGE
$ commercelayer res:args [-D [-a <value> -o list|retrieve|create|update -r <value>]]
FLAGS
-D, --delete delete saved arguments associated to the alias
-a, --alias=<value> the alias associated to saved command arguments
-o, --operation=<option> the resource operation
<options: list|retrieve|create|update>
-r, --resource=<value> the resource type
DESCRIPTION
show all the saved command arguments
ALIASES
$ commercelayer res:args
commercelayer res:create RESOURCE
Create a new resource.
USAGE
$ commercelayer res:create [RESOURCE] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc | -R]]
[--curl ] [--node ] [-H ] [-O ] [-O <value>] [-D <value> | -a <value> | -r <value> | -m <value> | | --load-args
<value> | --save-args <value>]
ARGUMENTS
RESOURCE the resource type
FLAGS
-D, --data=<value> the data file to use as request body
-H, --headers show response headers
-O, --headers-only show only response headers
-O, --object=<value>... define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=<value>... define a resource attribute
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-m, --metadata=<value>... define a metadata attribute or a set of metadata attributes
-o, --organization=<value> (required) the slug of your organization
-r, --relationship=<value>... define a relationship with another resource
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
create a new resource
ALIASES
$ commercelayer create
$ commercelayer rc
$ commercelayer res:create
$ commercelayer post
EXAMPLES
$ commercelayer resources:create customers -a email=user@test.com
$ clayer res:create customers -a email="user@test-com" -r customer_group=customer_groups/<customerGroupId>
$ cl create customers -a email=user@test.com -m meta_key="meta value"
$ cl rc customers -D /path/to/data/file/data.json
commercelayer res:delete RESOURCE [ID]
Delete an existing resource.
USAGE
$ commercelayer res:delete [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
delete an existing resource
ALIASES
$ commercelayer delete
$ commercelayer rd
$ commercelayer res:delete
EXAMPLES
$ commercelayer resources:delete customers/<customerId>
$ cl delete customers <customerId>
commercelayer res:doc RESOURCE
Open the default browser and show the online documentation for the resource.
USAGE
$ commercelayer res:doc [RESOURCE] [-p object|create|retrieve|list|update|delete]
ARGUMENTS
RESOURCE the resource for which you want to access the online documentation
FLAGS
-p, --page=<option> the doc page you want to access
<options: object|create|retrieve|list|update|delete>
DESCRIPTION
open the default browser and show the online documentation for the resource
ALIASES
$ commercelayer res:doc
$ commercelayer doc
EXAMPLES
$ commercelayer resources:doc customers
$ cl res:doc customers
$ cl doc customers -p create
commercelayer res:fetch PATH [ID]
Retrieve a resource or list a set of resources.
USAGE
$ commercelayer res:fetch [PATH] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-x <value> | -X <value>] [-e
<value> | ] [-w <value>] [-p <value>] [-n <value>] [-s <value>]
ARGUMENTS
PATH path (or URL) of the resource(s) to fetch
ID resource id
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
retrieve a resource or list a set of resources
ALIASES
$ commercelayer fetch
$ commercelayer res:fetch
$ commercelayer rf
EXAMPLES
$ commercelayer resources:fetch customers
$ commercelayer res:fetch customers
$ clayer res:fetch customers/<customerId>
$ cl fetch customers/<customerId>/<customerRelationship>
$ cl fetch customers/{customerId}/orders aBcdEkYWx
commercelayer res:filters
Show a list of all available filter predicates.
USAGE
$ commercelayer res:filters
DESCRIPTION
show a list of all available filter predicates
ALIASES
$ commercelayer res:filters
EXAMPLES
$ commercelayer resources:filters
$ cl res:filters
commercelayer res:get RESOURCE [ID]
Retrieve a resource or list a set of resources.
USAGE
$ commercelayer res:get [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-p <value>] [-n
<value>] [-s <value>] [-x <value> | -X <value>] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
retrieve a resource or list a set of resources
ALIASES
$ commercelayer get
$ commercelayer res:get
$ commercelayer rg
EXAMPLES
$ commercelayer resources:get customers
$ commercelayer res:get customers
$ clayer res:get customers/<customerId>
$ cl get customers <customerId>
commercelayer res:list RESOURCE
Fetch a collection of resources.
USAGE
$ commercelayer res:list [RESOURCE] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc | -R]]
[--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-p <value>] [-n <value>]
[-s <value>] [-x <value> | -X <value>] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch a collection of resources
ALIASES
$ commercelayer list
$ commercelayer rl
$ commercelayer res:list
EXAMPLES
$ commercelayer resources:list customers -f id,email,customer_group -i customer_group -s updated_at
$ cl res:list customers -i customer_group -f customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"
$ cl list customers -p 5 -n 10 -s -created_at --raw
commercelayer res:retrieve RESOURCE [ID]
Fetch a single resource.
USAGE
$ commercelayer res:retrieve [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-x <value> | -X <value>] [-e
<value> | ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-u, --unformatted print unformatted JSON output
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch a single resource
ALIASES
$ commercelayer retrieve
$ commercelayer rr
$ commercelayer res:retrieve
EXAMPLES
$ commercelayer resources:retrieve customers/<customerId>
$ commercelayer retrieve customers <customerId>
$ cl res:retrieve customers <customerId>
$ clayer rr customers/<customerId>
commercelayer res:update RESOURCE [ID]
Update an existing resource.
USAGE
$ commercelayer res:update [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [-H ] [-O ] [-O <value>] [-D <value> | -a <value> | -r <value> | [-m <value> | -M <value>]
| | | --load-args <value> | --save-args <value>]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to update
FLAGS
-D, --data=<value> the data file to use as request body
-H, --headers show response headers
-M, --metadata-replace=<value>... define a metadata attribute and replace every item already presente in the remote
resource
-O, --headers-only show only response headers
-O, --object=<value>... define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=<value>... define a resource attribute
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-m, --metadata=<value>... define a metadata attribute and merge it with the metadata already present in the
remote resource
-o, --organization=<value> (required) the slug of your organization
-r, --relationship=<value>... define a relationship with another resource
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
update an existing resource
ALIASES
$ commercelayer update
$ commercelayer ru
$ commercelayer res:update
$ commercelayer patch
EXAMPLES
$ commercelayer resources:update customers/<customerId> -a reference=referenceId
$ commercelayer res:update customers <customerId> -a reference_origin="Ref Origin"
$ cl update customers/<customerId> -m meta_key="meta value"
$ cl ru customers <customerId> -M meta_key="metadata overwrite
$ clayer update customers <customerId> -D /path/to/data/file/data.json
commercelayer resources
List all the available Commerce Layer API resources.
USAGE
$ commercelayer resources [-h]
FLAGS
-h, --help Show CLI help.
DESCRIPTION
list all the available Commerce Layer API resources
EXAMPLES
$ cl-resources resources
$ cl-res resources
$ commercelayer resources
$ cl resources
See code: src/commands/resources/index.ts
commercelayer resources:all RESOURCE
Fetch all resources.
USAGE
$ commercelayer resources:all [RESOURCE] -o <value> [-i <value>] [-u -j] [-l curl|node [--doc | -R]] [--curl ]
[--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-s <value>] [-x <value> | -X
<value>] [-D ,|;|||TAB [-C -f <value>]] [-H <value> ] [-b] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
FLAGS
-C, --csv export fields in csv format
-D, --delimiter=(,|;|||TAB) the delimiter character to use in the CSV output file (one of ',', ';', '|', TAB)
-H, --header=<value>... rename column headers defining a comma-separated list of values field:"renamed title"
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-b, --blind execute in blind mode without prompt and progress bar
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resourceType/]field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch all resources
ALIASES
$ commercelayer all
$ commercelayer ra
$ commercelayer res:all
EXAMPLES
$ commercelayer resources:all customers -f id,email,customer_group -i customer_group -s updated_at
$ cl res:all customers -i customer_group -f customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"
$ cl all customers -s -created_at --json
See code: src/commands/resources/all.ts
commercelayer resources:args
Show all the saved command arguments.
USAGE
$ commercelayer resources:args [-D [-a <value> -o list|retrieve|create|update -r <value>]]
FLAGS
-D, --delete delete saved arguments associated to the alias
-a, --alias=<value> the alias associated to saved command arguments
-o, --operation=<option> the resource operation
<options: list|retrieve|create|update>
-r, --resource=<value> the resource type
DESCRIPTION
show all the saved command arguments
ALIASES
$ commercelayer res:args
See code: src/commands/resources/args.ts
commercelayer resources:create RESOURCE
Create a new resource.
USAGE
$ commercelayer resources:create [RESOURCE] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc | -R]]
[--curl ] [--node ] [-H ] [-O ] [-O <value>] [-D <value> | -a <value> | -r <value> | -m <value> | | --load-args
<value> | --save-args <value>]
ARGUMENTS
RESOURCE the resource type
FLAGS
-D, --data=<value> the data file to use as request body
-H, --headers show response headers
-O, --headers-only show only response headers
-O, --object=<value>... define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=<value>... define a resource attribute
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-m, --metadata=<value>... define a metadata attribute or a set of metadata attributes
-o, --organization=<value> (required) the slug of your organization
-r, --relationship=<value>... define a relationship with another resource
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
create a new resource
ALIASES
$ commercelayer create
$ commercelayer rc
$ commercelayer res:create
$ commercelayer post
EXAMPLES
$ commercelayer resources:create customers -a email=user@test.com
$ clayer res:create customers -a email="user@test-com" -r customer_group=customer_groups/<customerGroupId>
$ cl create customers -a email=user@test.com -m meta_key="meta value"
$ cl rc customers -D /path/to/data/file/data.json
See code: src/commands/resources/create.ts
commercelayer resources:delete RESOURCE [ID]
Delete an existing resource.
USAGE
$ commercelayer resources:delete [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
delete an existing resource
ALIASES
$ commercelayer delete
$ commercelayer rd
$ commercelayer res:delete
EXAMPLES
$ commercelayer resources:delete customers/<customerId>
$ cl delete customers <customerId>
See code: src/commands/resources/delete.ts
commercelayer resources:doc RESOURCE
Open the default browser and show the online documentation for the resource.
USAGE
$ commercelayer resources:doc [RESOURCE] [-p object|create|retrieve|list|update|delete]
ARGUMENTS
RESOURCE the resource for which you want to access the online documentation
FLAGS
-p, --page=<option> the doc page you want to access
<options: object|create|retrieve|list|update|delete>
DESCRIPTION
open the default browser and show the online documentation for the resource
ALIASES
$ commercelayer res:doc
$ commercelayer doc
EXAMPLES
$ commercelayer resources:doc customers
$ cl res:doc customers
$ cl doc customers -p create
See code: src/commands/resources/doc.ts
commercelayer resources:fetch PATH [ID]
Retrieve a resource or list a set of resources.
USAGE
$ commercelayer resources:fetch [PATH] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-x <value> | -X <value>] [-e
<value> | ] [-w <value>] [-p <value>] [-n <value>] [-s <value>]
ARGUMENTS
PATH path (or URL) of the resource(s) to fetch
ID resource id
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
retrieve a resource or list a set of resources
ALIASES
$ commercelayer fetch
$ commercelayer res:fetch
$ commercelayer rf
EXAMPLES
$ commercelayer resources:fetch customers
$ commercelayer res:fetch customers
$ clayer res:fetch customers/<customerId>
$ cl fetch customers/<customerId>/<customerRelationship>
$ cl fetch customers/{customerId}/orders aBcdEkYWx
See code: src/commands/resources/fetch.ts
commercelayer resources:filters
Show a list of all available filter predicates.
USAGE
$ commercelayer resources:filters
DESCRIPTION
show a list of all available filter predicates
ALIASES
$ commercelayer res:filters
EXAMPLES
$ commercelayer resources:filters
$ cl res:filters
See code: src/commands/resources/filters.ts
commercelayer resources:get RESOURCE [ID]
Retrieve a resource or list a set of resources.
USAGE
$ commercelayer resources:get [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-p <value>] [-n
<value>] [-s <value>] [-x <value> | -X <value>] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
retrieve a resource or list a set of resources
ALIASES
$ commercelayer get
$ commercelayer res:get
$ commercelayer rg
EXAMPLES
$ commercelayer resources:get customers
$ commercelayer res:get customers
$ clayer res:get customers/<customerId>
$ cl get customers <customerId>
See code: src/commands/resources/get.ts
commercelayer resources:list RESOURCE
Fetch a collection of resources.
USAGE
$ commercelayer resources:list [RESOURCE] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc | -R]]
[--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-p <value>] [-n <value>]
[-s <value>] [-x <value> | -X <value>] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch a collection of resources
ALIASES
$ commercelayer list
$ commercelayer rl
$ commercelayer res:list
EXAMPLES
$ commercelayer resources:list customers -f id,email,customer_group -i customer_group -s updated_at
$ cl res:list customers -i customer_group -f customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"
$ cl list customers -p 5 -n 10 -s -created_at --raw
See code: src/commands/resources/list.ts
commercelayer resources:retrieve RESOURCE [ID]
Fetch a single resource.
USAGE
$ commercelayer resources:retrieve [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-x <value> | -X <value>] [-e
<value> | ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-u, --unformatted print unformatted JSON output
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch a single resource
ALIASES
$ commercelayer retrieve
$ commercelayer rr
$ commercelayer res:retrieve
EXAMPLES
$ commercelayer resources:retrieve customers/<customerId>
$ commercelayer retrieve customers <customerId>
$ cl res:retrieve customers <customerId>
$ clayer rr customers/<customerId>
See code: src/commands/resources/retrieve.ts
commercelayer resources:update RESOURCE [ID]
Update an existing resource.
USAGE
$ commercelayer resources:update [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [-H ] [-O ] [-O <value>] [-D <value> | -a <value> | -r <value> | [-m <value> | -M <value>]
| | | --load-args <value> | --save-args <value>]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to update
FLAGS
-D, --data=<value> the data file to use as request body
-H, --headers show response headers
-M, --metadata-replace=<value>... define a metadata attribute and replace every item already presente in the remote
resource
-O, --headers-only show only response headers
-O, --object=<value>... define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=<value>... define a resource attribute
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-m, --metadata=<value>... define a metadata attribute and merge it with the metadata already present in the
remote resource
-o, --organization=<value> (required) the slug of your organization
-r, --relationship=<value>... define a relationship with another resource
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
update an existing resource
ALIASES
$ commercelayer update
$ commercelayer ru
$ commercelayer res:update
$ commercelayer patch
EXAMPLES
$ commercelayer resources:update customers/<customerId> -a reference=referenceId
$ commercelayer res:update customers <customerId> -a reference_origin="Ref Origin"
$ cl update customers/<customerId> -m meta_key="meta value"
$ cl ru customers <customerId> -M meta_key="metadata overwrite
$ clayer update customers <customerId> -D /path/to/data/file/data.json
See code: src/commands/resources/update.ts
commercelayer retrieve RESOURCE [ID]
Fetch a single resource.
USAGE
$ commercelayer retrieve [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-x <value> | -X <value>] [-e
<value> | ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-u, --unformatted print unformatted JSON output
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch a single resource
ALIASES
$ commercelayer retrieve
$ commercelayer rr
$ commercelayer res:retrieve
EXAMPLES
$ commercelayer resources:retrieve customers/<customerId>
$ commercelayer retrieve customers <customerId>
$ cl res:retrieve customers <customerId>
$ clayer rr customers/<customerId>
commercelayer rf PATH [ID]
Retrieve a resource or list a set of resources.
USAGE
$ commercelayer rf [PATH] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-x <value> | -X <value>] [-e
<value> | ] [-w <value>] [-p <value>] [-n <value>] [-s <value>]
ARGUMENTS
PATH path (or URL) of the resource(s) to fetch
ID resource id
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
retrieve a resource or list a set of resources
ALIASES
$ commercelayer fetch
$ commercelayer res:fetch
$ commercelayer rf
EXAMPLES
$ commercelayer resources:fetch customers
$ commercelayer res:fetch customers
$ clayer res:fetch customers/<customerId>
$ cl fetch customers/<customerId>/<customerRelationship>
$ cl fetch customers/{customerId}/orders aBcdEkYWx
commercelayer rg RESOURCE [ID]
Retrieve a resource or list a set of resources.
USAGE
$ commercelayer rg [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-p <value>] [-n
<value>] [-s <value>] [-x <value> | -X <value>] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
retrieve a resource or list a set of resources
ALIASES
$ commercelayer get
$ commercelayer res:get
$ commercelayer rg
EXAMPLES
$ commercelayer resources:get customers
$ commercelayer res:get customers
$ clayer res:get customers/<customerId>
$ cl get customers <customerId>
commercelayer rl RESOURCE
Fetch a collection of resources.
USAGE
$ commercelayer rl [RESOURCE] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc | -R]]
[--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-w <value>] [-p <value>] [-n <value>]
[-s <value>] [-x <value> | -X <value>] [-e <value> | ]
ARGUMENTS
RESOURCE the resource type
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-n, --pageSize=<value> number of elements per page
-o, --organization=<value> (required) the slug of your organization
-p, --page=<value> page number
-s, --sort=<value>... defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=<value>... comma separated list of query filters
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch a collection of resources
ALIASES
$ commercelayer list
$ commercelayer rl
$ commercelayer res:list
EXAMPLES
$ commercelayer resources:list customers -f id,email,customer_group -i customer_group -s updated_at
$ cl res:list customers -i customer_group -f customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"
$ cl list customers -p 5 -n 10 -s -created_at --raw
commercelayer rr RESOURCE [ID]
Fetch a single resource.
USAGE
$ commercelayer rr [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ] [-x <value> | -X <value>] [-e
<value> | ]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
FLAGS
-H, --headers show response headers
-O, --headers-only show only response headers
-R, --raw print out the raw API response
-X, --save-path=<value> save command output to file and create missing path directories
-e, --extract=<value>... extract subfields from object attributes
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-o, --organization=<value> (required) the slug of your organization
-u, --unformatted print unformatted JSON output
-x, --save=<value> save command output to file
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
fetch a single resource
ALIASES
$ commercelayer retrieve
$ commercelayer rr
$ commercelayer res:retrieve
EXAMPLES
$ commercelayer resources:retrieve customers/<customerId>
$ commercelayer retrieve customers <customerId>
$ cl res:retrieve customers <customerId>
$ clayer rr customers/<customerId>
commercelayer ru RESOURCE [ID]
Update an existing resource.
USAGE
$ commercelayer ru [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [-H ] [-O ] [-O <value>] [-D <value> | -a <value> | -r <value> | [-m <value> | -M <value>]
| | | --load-args <value> | --save-args <value>]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to update
FLAGS
-D, --data=<value> the data file to use as request body
-H, --headers show response headers
-M, --metadata-replace=<value>... define a metadata attribute and replace every item already presente in the remote
resource
-O, --headers-only show only response headers
-O, --object=<value>... define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=<value>... define a resource attribute
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-m, --metadata=<value>... define a metadata attribute and merge it with the metadata already present in the
remote resource
-o, --organization=<value> (required) the slug of your organization
-r, --relationship=<value>... define a relationship with another resource
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
update an existing resource
ALIASES
$ commercelayer update
$ commercelayer ru
$ commercelayer res:update
$ commercelayer patch
EXAMPLES
$ commercelayer resources:update customers/<customerId> -a reference=referenceId
$ commercelayer res:update customers <customerId> -a reference_origin="Ref Origin"
$ cl update customers/<customerId> -m meta_key="meta value"
$ cl ru customers <customerId> -M meta_key="metadata overwrite
$ clayer update customers <customerId> -D /path/to/data/file/data.json
commercelayer update RESOURCE [ID]
Update an existing resource.
USAGE
$ commercelayer update [RESOURCE] [ID] -o <value> [-i <value>] [-f <value>] [-u -j] [-l curl|node [--doc |
-R]] [--curl ] [--node ] [-H ] [-O ] [-O <value>] [-D <value> | -a <value> | -r <value> | [-m <value> | -M <value>]
| | | --load-args <value> | --save-args <value>]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to update
FLAGS
-D, --data=<value> the data file to use as request body
-H, --headers show response headers
-M, --metadata-replace=<value>... define a metadata attribute and replace every item already presente in the remote
resource
-O, --headers-only show only response headers
-O, --object=<value>... define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=<value>... define a resource attribute
-f, --fields=<value>... comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=<value>... comma separated resources to include
-j, --json convert output in standard JSON format
-m, --metadata=<value>... define a metadata attribute and merge it with the metadata already present in the
remote resource
-o, --organization=<value> (required) the slug of your organization
-r, --relationship=<value>... define a relationship with another resource
-u, --unformatted print unformatted JSON output
--load-args=<value> load previously saved command arguments
--save-args=<value> save command data to file for future use
DOCUMENTATION FLAGS
-l, --lang=<option> show the CLI command in the specified language syntax
<options: curl|node>
--curl show the equivalent cURL command of the CLI command
--doc show the CLI command in a specific language
--node show the equivalent Node SDK source code of the CLI command
DESCRIPTION
update an existing resource
ALIASES
$ commercelayer update
$ commercelayer ru
$ commercelayer res:update
$ commercelayer patch
EXAMPLES
$ commercelayer resources:update customers/<customerId> -a reference=referenceId
$ commercelayer res:update customers <customerId> -a reference_origin="Ref Origin"
$ cl update customers/<customerId> -m meta_key="meta value"
$ cl ru customers <customerId> -M meta_key="metadata overwrite
$ clayer update customers <customerId> -D /path/to/data/file/data.json
FAQs
Commerce Layer CLI Resources plugin
The npm package @commercelayer/cli-plugin-resources receives a total of 62 weekly downloads. As such, @commercelayer/cli-plugin-resources popularity was classified as not popular.
We found that @commercelayer/cli-plugin-resources demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.