Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commercelayer/cli-plugin-resources

Package Overview
Dependencies
Maintainers
5
Versions
267
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercelayer/cli-plugin-resources

Commerce Layer CLI Resources plugin

  • 5.5.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
228
increased by115.09%
Maintainers
5
Weekly downloads
 
Created
Source

@commercelayer/cli-plugin-resources

Commerce Layer CLI Resources plugin

oclif Version Downloads/week License CodeQL

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 resources

Commands

commercelayer all RESOURCE

Fetch all resources.

USAGE
  $ commercelayer all [RESOURCE] -o <value> [-i <value>] [-u -j] [-l curl|node [-D | -R]] [--curl ]
    [--node ] [--save-args <value>] [--load-args <value>] [-w <value>] [-s <value>] [-x <value> | -X <value>] [-H
    <value> [-C -f <value>]] [-b] [-e <value> | ]

ARGUMENTS
  RESOURCE  the resource type

FLAGS
  -C, --csv                   export fields in csv format
  -D, --doc                   show the CLI command in a specific language
  -H, --header=<value>...     rename column headers defining a comma-separated list of values field:"renamed title"
  -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 [resource]=field1,field2...
  -i, --include=<value>...    comma separated resources to include
  -j, --json                  convert output in standard JSON format
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

DESCRIPTION
  fetch all resources

ALIASES
  $ commercelayer all
  $ commercelayer ra
  $ commercelayer res:all

EXAMPLES
  $ commercelayer resources:all customers -f id,email -i customer_group -s updated_at

  $ cl res:all -i customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"

  $ cl all -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 [-D | -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
  -D, --doc                      show the CLI command in a specific language
  -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
  -l, --lang=<option>            show the CLI command in the specified language syntax
                                 <options: curl|node>
  -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
  --curl                         show the equivalent cURL command of the CLI command
  --load-args=<value>            load previously saved command arguments
  --node                         show the equivalent Node SDK source code of the CLI command
  --save-args=<value>            save command data to file for future use

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 [-D |
    -R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ]

ARGUMENTS
  RESOURCE  the resource type
  ID        id of the resource to retrieve

FLAGS
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -o, --organization=<value>  (required) the slug of your organization
  -u, --unformatted           print unformatted JSON output
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D | -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D |
    -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D | -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

DESCRIPTION
  fetch a collection of resources

ALIASES
  $ commercelayer list
  $ commercelayer rl
  $ commercelayer res:list

EXAMPLES
  $ commercelayer resources:list customers -f id,email -i customer_group -s updated_at

  $ cl res:list -i customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"

  $ cl list -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 [-D |
    -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
  -D, --doc                          show the CLI command in a specific language
  -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
  -l, --lang=<option>                show the CLI command in the specified language syntax
                                     <options: curl|node>
  -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
  --curl                             show the equivalent cURL command of the CLI command
  --load-args=<value>                load previously saved command arguments
  --node                             show the equivalent Node SDK source code of the CLI command
  --save-args=<value>                save command data to file for future use

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 [-D | -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
  -D, --doc                      show the CLI command in a specific language
  -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
  -l, --lang=<option>            show the CLI command in the specified language syntax
                                 <options: curl|node>
  -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
  --curl                         show the equivalent cURL command of the CLI command
  --load-args=<value>            load previously saved command arguments
  --node                         show the equivalent Node SDK source code of the CLI command
  --save-args=<value>            save command data to file for future use

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 [-D | -R]] [--curl ]
    [--node ] [--save-args <value>] [--load-args <value>] [-w <value>] [-s <value>] [-x <value> | -X <value>] [-H
    <value> [-C -f <value>]] [-b] [-e <value> | ]

ARGUMENTS
  RESOURCE  the resource type

FLAGS
  -C, --csv                   export fields in csv format
  -D, --doc                   show the CLI command in a specific language
  -H, --header=<value>...     rename column headers defining a comma-separated list of values field:"renamed title"
  -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 [resource]=field1,field2...
  -i, --include=<value>...    comma separated resources to include
  -j, --json                  convert output in standard JSON format
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

DESCRIPTION
  fetch all resources

ALIASES
  $ commercelayer all
  $ commercelayer ra
  $ commercelayer res:all

EXAMPLES
  $ commercelayer resources:all customers -f id,email -i customer_group -s updated_at

  $ cl res:all -i customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"

  $ cl all -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 [-D | -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
  -D, --doc                      show the CLI command in a specific language
  -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
  -l, --lang=<option>            show the CLI command in the specified language syntax
                                 <options: curl|node>
  -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
  --curl                         show the equivalent cURL command of the CLI command
  --load-args=<value>            load previously saved command arguments
  --node                         show the equivalent Node SDK source code of the CLI command
  --save-args=<value>            save command data to file for future use

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 [-D |
    -R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ]

ARGUMENTS
  RESOURCE  the resource type
  ID        id of the resource to retrieve

FLAGS
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -o, --organization=<value>  (required) the slug of your organization
  -u, --unformatted           print unformatted JSON output
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D | -R]] [--curl ]
    [--node ] [--save-args <value>] [--load-args <value>] [-w <value>] [-s <value>] [-x <value> | -X <value>] [-H
    <value> [-C -f <value>]] [-b] [-e <value> | ]

ARGUMENTS
  RESOURCE  the resource type

FLAGS
  -C, --csv                   export fields in csv format
  -D, --doc                   show the CLI command in a specific language
  -H, --header=<value>...     rename column headers defining a comma-separated list of values field:"renamed title"
  -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 [resource]=field1,field2...
  -i, --include=<value>...    comma separated resources to include
  -j, --json                  convert output in standard JSON format
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

DESCRIPTION
  fetch all resources

ALIASES
  $ commercelayer all
  $ commercelayer ra
  $ commercelayer res:all

EXAMPLES
  $ commercelayer resources:all customers -f id,email -i customer_group -s updated_at

  $ cl res:all -i customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"

  $ cl all -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 [-D | -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
  -D, --doc                      show the CLI command in a specific language
  -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
  -l, --lang=<option>            show the CLI command in the specified language syntax
                                 <options: curl|node>
  -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
  --curl                         show the equivalent cURL command of the CLI command
  --load-args=<value>            load previously saved command arguments
  --node                         show the equivalent Node SDK source code of the CLI command
  --save-args=<value>            save command data to file for future use

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 [-D |
    -R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ]

ARGUMENTS
  RESOURCE  the resource type
  ID        id of the resource to retrieve

FLAGS
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -o, --organization=<value>  (required) the slug of your organization
  -u, --unformatted           print unformatted JSON output
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D | -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D |
    -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D | -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

DESCRIPTION
  fetch a collection of resources

ALIASES
  $ commercelayer list
  $ commercelayer rl
  $ commercelayer res:list

EXAMPLES
  $ commercelayer resources:list customers -f id,email -i customer_group -s updated_at

  $ cl res:list -i customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"

  $ cl list -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 [-D |
    -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -o, --organization=<value>  (required) the slug of your organization
  -u, --unformatted           print unformatted JSON output
  -x, --save=<value>          save command output to file
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D |
    -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
  -D, --doc                          show the CLI command in a specific language
  -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
  -l, --lang=<option>                show the CLI command in the specified language syntax
                                     <options: curl|node>
  -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
  --curl                             show the equivalent cURL command of the CLI command
  --load-args=<value>                load previously saved command arguments
  --node                             show the equivalent Node SDK source code of the CLI command
  --save-args=<value>                save command data to file for future use

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 [-D | -R]] [--curl ]
    [--node ] [--save-args <value>] [--load-args <value>] [-w <value>] [-s <value>] [-x <value> | -X <value>] [-H
    <value> [-C -f <value>]] [-b] [-e <value> | ]

ARGUMENTS
  RESOURCE  the resource type

FLAGS
  -C, --csv                   export fields in csv format
  -D, --doc                   show the CLI command in a specific language
  -H, --header=<value>...     rename column headers defining a comma-separated list of values field:"renamed title"
  -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 [resource]=field1,field2...
  -i, --include=<value>...    comma separated resources to include
  -j, --json                  convert output in standard JSON format
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

DESCRIPTION
  fetch all resources

ALIASES
  $ commercelayer all
  $ commercelayer ra
  $ commercelayer res:all

EXAMPLES
  $ commercelayer resources:all customers -f id,email -i customer_group -s updated_at

  $ cl res:all -i customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"

  $ cl all -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 [-D | -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
  -D, --doc                      show the CLI command in a specific language
  -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
  -l, --lang=<option>            show the CLI command in the specified language syntax
                                 <options: curl|node>
  -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
  --curl                         show the equivalent cURL command of the CLI command
  --load-args=<value>            load previously saved command arguments
  --node                         show the equivalent Node SDK source code of the CLI command
  --save-args=<value>            save command data to file for future use

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 [-D |
    -R]] [--curl ] [--node ] [--save-args <value>] [--load-args <value>] [-H ] [-O ]

ARGUMENTS
  RESOURCE  the resource type
  ID        id of the resource to retrieve

FLAGS
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -o, --organization=<value>  (required) the slug of your organization
  -u, --unformatted           print unformatted JSON output
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D | -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D |
    -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D | -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

DESCRIPTION
  fetch a collection of resources

ALIASES
  $ commercelayer list
  $ commercelayer rl
  $ commercelayer res:list

EXAMPLES
  $ commercelayer resources:list customers -f id,email -i customer_group -s updated_at

  $ cl res:list -i customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"

  $ cl list -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 [-D |
    -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -o, --organization=<value>  (required) the slug of your organization
  -u, --unformatted           print unformatted JSON output
  -x, --save=<value>          save command output to file
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D |
    -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
  -D, --doc                          show the CLI command in a specific language
  -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
  -l, --lang=<option>                show the CLI command in the specified language syntax
                                     <options: curl|node>
  -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
  --curl                             show the equivalent cURL command of the CLI command
  --load-args=<value>                load previously saved command arguments
  --node                             show the equivalent Node SDK source code of the CLI command
  --save-args=<value>                save command data to file for future use

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 [-D |
    -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -o, --organization=<value>  (required) the slug of your organization
  -u, --unformatted           print unformatted JSON output
  -x, --save=<value>          save command output to file
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D | -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D |
    -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D | -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -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
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

DESCRIPTION
  fetch a collection of resources

ALIASES
  $ commercelayer list
  $ commercelayer rl
  $ commercelayer res:list

EXAMPLES
  $ commercelayer resources:list customers -f id,email -i customer_group -s updated_at

  $ cl res:list -i customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"

  $ cl list -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 [-D |
    -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
  -D, --doc                   show the CLI command in a specific language
  -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
  -l, --lang=<option>         show the CLI command in the specified language syntax
                              <options: curl|node>
  -o, --organization=<value>  (required) the slug of your organization
  -u, --unformatted           print unformatted JSON output
  -x, --save=<value>          save command output to file
  --curl                      show the equivalent cURL command of the CLI command
  --load-args=<value>         load previously saved command arguments
  --node                      show the equivalent Node SDK source code of the CLI command
  --save-args=<value>         save command data to file for future use

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 [-D |
    -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
  -D, --doc                          show the CLI command in a specific language
  -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
  -l, --lang=<option>                show the CLI command in the specified language syntax
                                     <options: curl|node>
  -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
  --curl                             show the equivalent cURL command of the CLI command
  --load-args=<value>                load previously saved command arguments
  --node                             show the equivalent Node SDK source code of the CLI command
  --save-args=<value>                save command data to file for future use

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 [-D |
    -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
  -D, --doc                          show the CLI command in a specific language
  -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
  -l, --lang=<option>                show the CLI command in the specified language syntax
                                     <options: curl|node>
  -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
  --curl                             show the equivalent cURL command of the CLI command
  --load-args=<value>                load previously saved command arguments
  --node                             show the equivalent Node SDK source code of the CLI command
  --save-args=<value>                save command data to file for future use

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

Keywords

FAQs

Package last updated on 01 Jul 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc