Products

List all products of an administration

Returns a paginated list of products in the administration. Each page contains 10 products. You can use the page parameter to fetch the next page of products.

Parameters

Parameter Type Description
query String

Allows filtering by product name.

page Integer

The page to fetch, starting at 1.

currency String

ISO three-character currency code, e.g. EUR or USD.

Example: returns a list of products

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/products.json?
    

Response

        
          
          Status: 200 OK
        
      
      [
  {
    "id": "204882908498888364",
    "administration_id": 123,
    "description": "My product description",
    "price": "100.0",
    "currency": "EUR",
    "frequency": null,
    "frequency_type": null,
    "tax_rate_id": "204882738248942697",
    "ledger_account_id": "204882737990992982",
    "created_at": "2017-11-02T08:33:09.426Z",
    "updated_at": "2017-11-02T08:33:09.426Z"
  }
]
      

Returns information about a product

Example: returns a single product

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/products/204882908650931885.json?
    

Response

        
          
          Status: 200 OK
        
      
      {
  "id": "204882908650931885",
  "administration_id": 123,
  "description": "My product description",
  "price": "100.0",
  "currency": "EUR",
  "frequency": null,
  "frequency_type": null,
  "tax_rate_id": "204882738248942697",
  "ledger_account_id": "204882737990992982",
  "created_at": "2017-11-02T08:33:09.571Z",
  "updated_at": "2017-11-02T08:33:09.571Z"
}
      

Example: returns 404 when product does not exist

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XGET \
  https://moneybird.com/api/v2/123/products/34123123.json?
    

Response

        
          
          Status: 404 Not Found
        
      
      {
  "error": "record not found",
  "symbolic": {
    "id": "not_found"
  }
}
      

Creates a new product

Parameters

Parameter Type Description
product[description] String

Required

product[price] Decimal

Required

Both a decimal and a string ‘10,95’ are accepted.

product[tax_rate_id] Integer

Required

Should be a valid tax rate id.

product[ledger_account_id] Integer

Required

Should be a valid ledger account id.

product[currency] String

Required

ISO three-character currency code, e.g. EUR or USD.

product[frequency_type] String

Can be day, week, month, quarter or year.

product[frequency] Integer

Should be an integer >= 0.

product[frequency_preset] String

Example: creates a new product

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"product":{"description":"Geldvogel","price":"50,50","tax_rate_id":204882908990670513,"ledger_account_id":204882909024224947}}' \
  https://moneybird.com/api/v2/123/products.json
    

Response

        
          
          Status: 201 Created
        
      
      {
  "id": "204882909072459445",
  "administration_id": 123,
  "description": "Geldvogel",
  "price": "50.5",
  "currency": "EUR",
  "frequency": null,
  "frequency_type": null,
  "tax_rate_id": "204882908990670513",
  "ledger_account_id": "204882909024224947",
  "created_at": "2017-11-02T08:33:09.974Z",
  "updated_at": "2017-11-02T08:33:09.974Z"
}
      

Example: returns an error when information is missing

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPOST \
  -d '{"product":{"description":"","price":"","tax_rate_id":204882909191997112,"ledger_account_id":204882909214017210}}' \
  https://moneybird.com/api/v2/123/products.json
    

Response

        
          
          Status: 422 Unprocessable Entity
        
      
      {
  "error": {
    "description": [
      "cannot be empty"
    ],
    "price": [
      "cannot be empty"
    ]
  }
}
      

Updates a product

Parameters

Parameter Type Description
product[description] String
product[price] Decimal

Both a decimal and a string ‘10,95’ are accepted.

product[tax_rate_id] Integer

Should be a valid tax rate id.

product[ledger_account_id] Integer

Should be a valid ledger account id.

product[currency] String

ISO three-character currency code, e.g. EUR or USD.

product[frequency_type] String

Can be day, week, month, quarter or year.

product[frequency] Integer

Should be an integer >= 0.

product[frequency_preset] String

Example: updates a contact

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XPATCH \
  -d '{"product":{"description":"Updated","price":"123"}}' \
  https://moneybird.com/api/v2/123/products/204882909373400764.json
    

Response

        
          
          Status: 200 OK
        
      
      {
  "id": "204882909373400764",
  "administration_id": 123,
  "description": "Updated",
  "price": "123.0",
  "currency": "EUR",
  "frequency": null,
  "frequency_type": null,
  "tax_rate_id": "204882738248942697",
  "ledger_account_id": "204882737990992982",
  "created_at": "2017-11-02T08:33:10.259Z",
  "updated_at": "2017-11-02T08:33:10.310Z"
}
      

Deletes a product

Example: deletes a product

Request

curl -s -H "Content-Type: application/json" -H "Authorization: Bearer 84ec207ad0154a508f798e615a998ac1fd752926d00f955fb1df3e144cba44ab" \
  -XDELETE \
  -d '{}' \
  https://moneybird.com/api/v2/123/products/204882909554804413.json
    

Response