Create a discount
Changed onCreates a new discount.
If successful, your response includes a copy of the new discount entity.
Request
- Base URLhttps://sandbox-api.paddle.com
- AuthHTTP bearer
Request body
Example request
{
"id": "dsc_01gv5kpg05xp104ek2fmgjwttf",
"expires_at": "2024-10-12T07:20:50.52Z",
"custom_data": {
"customer_reference_id": "abcd1234"
},
"created_at": "2024-10-12T07:20:50.52Z",
"updated_at": "2024-10-13T07:20:50.52Z",
"discount_group_id": "dsg_01js2gqehzccfkywgx1jk2mtsp",
"import_meta": {
"external_id": "9b95b0b8-e10f-441a-862e-1936a6d818ab",
"imported_from": "paddle_classic"
}
}Response
The request has succeeded and a new resource has been created as a result.
Example response
{
"data": {
"id": "dsc_01gv5kpg05xp104ek2fmgjwttf",
"expires_at": "2024-10-12T07:20:50.52Z",
"custom_data": {
"customer_reference_id": "abcd1234"
},
"discount_group_id": "dsg_01js2gqehzccfkywgx1jk2mtsp",
"created_at": "2024-10-12T07:20:50.52Z",
"updated_at": "2024-10-13T07:20:50.52Z",
"import_meta": {
"external_id": "9b95b0b8-e10f-441a-862e-1936a6d818ab",
"imported_from": "paddle_classic"
}
},
"meta": {
"request_id": "b15ec92e-8688-40d4-a04d-f44cbec93355"
}
}Changes
- warning
added the new
CLPenum value to the//response property for the response status - warning
added the new
PENenum value to the//response property for the response status - info
added the new
CLPenum value to the request property/ - info
added the new
PENenum value to the request property/
- warning
- breaking
request body became required
- breaking
added to the
request propertyallOflist - breaking
added to the
request propertyallOflist - breaking
added to the
request propertyallOflist - breaking
added to the
request propertyallOflist - breaking
added to the
request propertyallOflist - breaking
added to the
request propertyallOflist - breaking
the request property
became not nullable - breaking
the request property
became not nullable - breaking
the request property
became not nullable - breaking
removed the enum value
customof the request property - breaking
removed the enum value
flatof the request property - breaking
removed the enum value
flat_per_seatof the request property - breaking
removed the enum value
percentageof the request property - breaking
removed the enum value
standardof the request property - breaking
removed
subschema #2from therequest propertyoneOflist - breaking
removed
subschema #2from therequest propertyoneOflist - breaking
removed
subschema #2from therequest propertyoneOflist - breaking
removed
subschema #2from therequest propertyoneOflist - breaking
removed
subschema #2from therequest propertyoneOflist - breaking
the
request property type changed fromstringto no type - breaking
the
request property type changed fromstringto no type - breaking
response property
data/maximum_recurring_intervalslist-of-types was widened by adding typesnullto media typeapplication/jsonof response201 - breaking
response property
data/restrict_tolist-of-types was widened by adding typesnullto media typeapplication/jsonof response201 - breaking
response property
data/usage_limitlist-of-types was widened by adding typesnullto media typeapplication/jsonof response201 - breaking
the
/response's property type changed fromstringto no type, and format fromdate-timeto no format for status - breaking
the
/response's property type changed fromstringto no type for status - breaking
the
/response's property type changed fromstringto no type for status - breaking
the
/response's property type changed fromstringto no type for status - breaking
the
/response's property type changed fromstringto no type, and format fromdate-timeto no format for status - breaking
the
response's property type changed fromobjectto no type for status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - warning
removed the optional property
/from the response with the status - info
added the new optional request property
- info
the request optional property
became not read-only - info
added
subschema #2to therequest propertyanyOflist - info
added
subschema #2to therequest propertyanyOflist - info
added
subschema #2to therequest propertyanyOflist - info
added
subschema #2to therequest propertyanyOflist - info
added
subschema #2to therequest propertyanyOflist - info
request property
list-of-types was widened by adding typesnullto media typeapplication/json - info
request property
list-of-types was widened by adding typesnullto media typeapplication/json - info
request property
list-of-types was widened by adding typesnullto media typeapplication/json - info
removed the pattern
^dsc_[a-z\d]{26}$from the request property - info
removed the enum value
activeof the request read-only propertystatus - info
removed the enum value
archivedof the request read-only propertystatus - info
the response optional property
/became not read-only for the status - info
added to the
response propertyallOflist for the response status - info
added to the
/response propertyallOflist for the response status - info
added to the
/response propertyallOflist for the response status - info
added to the
/response propertyallOflist for the response status - info
added to the
/response propertyallOflist for the response status - info
added to the
/response propertyallOflist for the response status - info
added
subschema #2to the/response propertyanyOflist for the response status - info
added
subschema #2to the/response propertyanyOflist for the response status - info
added
subschema #2to the/response propertyanyOflist for the response status - info
added
subschema #2to the/response propertyanyOflist for the response status - info
added
subschema #2to the/response propertyanyOflist for the response status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status - info
the response property
became required for the status - info
the response property
became required for the status - info
removed the
activeenum value from the/response property for the response status - info
removed the
archivedenum value from the/response property for the response status - info
removed the
customenum value from the/response property for the response status - info
removed the
standardenum value from the/response property for the response status - info
removed
subschema #2from the/response propertyoneOflist for the response status - info
removed
subschema #2from the/response propertyoneOflist for the response status - info
removed
subschema #2from the/response propertyoneOflist for the response status - info
removed
subschema #2from the/response propertyoneOflist for the response status - info
removed
subschema #2from the/response propertyoneOflist for the response status - info
the
/response's property pattern^dsc_[a-z\d]{26}$was removed for the status - info
added the required property
/to the response with the status
- breaking