Update a Transactable

Last edit: 

Contributors: 

To update a transactable, send a PUT request to /api/user/transactables/:transactable_id

HTTP request

PUT /api/user/transactables/:transactable_id

Parameters

Parameter Type Description Required Notes
form_configuration_name String Name of the form configuration Required
form TransactableForm TransactableForm parameters that corresponds with FormConfiguration configuration Required

Transactable Parameters

Parameter Type Description Required Notes
creator_id ID User that created transactable Required In html format it is taken from current_user
custom_addresses Hash[String=>CustomAddressForm] Custom addresses for this resource Optional
custom_attachments Hash[String=>CustomAttachmentForm] Custom attachments for this resource, such as pdf, doc Optional
custom_images Hash[String=>CustomImageForm] Custom images for this resource Optional
customizations Hash[String=>CustomizationForm] Customizations for this resource Optional
name String Name of the transactable Optional Will be used to generate slug
properties Hash[String=>Any] Custom properties Optional
transactable_type_id ID TransactableType to which this Transactable belongs Optional

Example request

"authorization: Token token=[YOUR API TOKEN]"
"accept: application/json"
"content-type: application/json"

{
  "form_configuration_name": "reference_rest_api_update_transactable",
  "form": {
    "name": "Super boat"
  }
}
Element Type Description Required?
form_configuration_name String Name of the defined FormConfiguration Required
form TransactableForm Attributes for user, should match configuration defined in corresponding FormConfiguration Required

Example response

HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

{}

Element Type Description
[…] […] […]

Error and Status Codes

Code Message Meaning
204 No Content Successfully fulfilled request
401 Unathorized Invalid Authentication
404 Not Found Can't find given resource
406 Not Acceptable Wrong parameters passed