{"method":"POST","path":"https://api.revcent.com/v2/metadata","summary":"Insert Metadata","description":"Insert one or more metadata entries to a specific item, using an item type and item ID. View markdown documentation at https://revcent.com/documentation/markdown/mcp/operation/InsertMetadata.md for an in-depth overview of this operation.","operationId":"InsertMetadata","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item_type":{"type":"string","description":"The item type the metadata is being inserted to.","enum":["customer","sale","product_sale","shipping","subscription","subscription_renewal","salvage_transaction","chargeback","fraud_detection"]},"item_id":{"type":"string","description":"The ID of the item type that the metadata is being inserted to.","minLength":20,"maxLength":20},"metadata":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string","description":"A name paired to the value for the metadata object. Limited to 100 characters in length.","minLength":1,"maxLength":100},"value":{"type":"string","description":"A value paired to the name for the metadata object. Limited to 255 characters in length.","minLength":1,"maxLength":255}},"type":"object","required":["name","value"]},"type":"array","description":"An array of metadata objects, each metadata object being a name and value pair."},"cascade":{"type":"boolean","description":"Whether or not to cascade inserted metadata into all sub related items. Default is false. For example, if inserting to sale, any shipping, subscriptions, etc. related to the sale will also have the metadata automatically inserted. Metadata will always be inserted to a related customer record regardless of cascade value."}},"type":"object","required":["item_type","item_id","metadata"]}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"API call response code.","type":"integer","format":"int32","enum":[1]},"item_type":{"type":"string"},"item_id":{"type":"string"},"result":{"type":"string"}},"type":"object","additionalProperties":false}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}