Package Exports
- @commercelayer/cli-plugin-resources
- @commercelayer/cli-plugin-resources/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@commercelayer/cli-plugin-resources) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@commercelayer/cli-plugin-resources
Commerce Layer CLI Resources plugin
Usage
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 resourcesCommands
commercelayer all RESOURCEcommercelayer create RESOURCEcommercelayer delete RESOURCE [ID]commercelayer doc RESOURCEcommercelayer fetch PATH [ID]commercelayer get RESOURCE [ID]commercelayer list RESOURCEcommercelayer patch RESOURCE [ID]commercelayer post RESOURCEcommercelayer ra RESOURCEcommercelayer rc RESOURCEcommercelayer rd RESOURCE [ID]commercelayer res:all RESOURCEcommercelayer res:argscommercelayer res:create RESOURCEcommercelayer res:delete RESOURCE [ID]commercelayer res:doc RESOURCEcommercelayer res:fetch PATH [ID]commercelayer res:filterscommercelayer res:get RESOURCE [ID]commercelayer res:list RESOURCEcommercelayer res:retrieve RESOURCE [ID]commercelayer res:update RESOURCE [ID]commercelayer resourcescommercelayer resources:all RESOURCEcommercelayer resources:argscommercelayer resources:create RESOURCEcommercelayer resources:delete RESOURCE [ID]commercelayer resources:doc RESOURCEcommercelayer resources:fetch PATH [ID]commercelayer resources:filterscommercelayer resources:get RESOURCE [ID]commercelayer resources:list RESOURCEcommercelayer resources:retrieve RESOURCE [ID]commercelayer resources:update RESOURCE [ID]commercelayer retrieve RESOURCE [ID]commercelayer rf PATH [ID]commercelayer rg RESOURCE [ID]commercelayer rl RESOURCEcommercelayer 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 --jsoncommercelayer 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.jsoncommercelayer 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 createcommercelayer 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 aBcdEkYWxcommercelayer 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 --rawcommercelayer 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.jsoncommercelayer 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.jsoncommercelayer 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 --jsoncommercelayer 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.jsoncommercelayer 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 --jsoncommercelayer 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:argscommercelayer 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.jsoncommercelayer 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 createcommercelayer 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 aBcdEkYWxcommercelayer 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:filterscommercelayer 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 --rawcommercelayer 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.jsoncommercelayer 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 resourcesSee 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 --jsonSee 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:argsSee 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.jsonSee 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 createSee 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 aBcdEkYWxSee 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:filtersSee 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 --rawSee 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.jsonSee 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 aBcdEkYWxcommercelayer 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 --rawcommercelayer 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.jsoncommercelayer 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