Proposal microservice
Use the Proposal object via JSON-RPC API 6.0 to store cart information at a point in time that allows you afterward to operate fast changes to the cart configuration so that you can offer custom deals to your shoppers. By using the Proposal object you can create, update, and search proposals via the 2Checkout API and control the following proposal attributes:
Proposal content
Price options
Proposal links
Billing details
Request parameters
Use the parameters below to add new custom deals for your shoppers via JSON-RPC API 6.0.
PROPOSAL OBJECT
proposalId
Required (string)
The unique merchant proposal id generated by the 2Checkout system.
name
Required (create) (string)
The name of the proposal.
version
Required (integer)
The version of the proposal. Every modification increments the version by 1.
createDate
Required (string)
The UTC creation date for the proposal in ISO 8601 format. Example: 2020-01-05T17:21:42+00:00.
updateDate
Required (string)
The update date of the proposal; date-time ISO 8601 format; populated by the UserId.
createdBy
Required (string)
The unique external system user identifier of the user that created the proposal. Example: [email protected].
updatedBy
Required (string)
The unique external system user identifier of the user that last updated the proposal. Example: [email protected].
locked
Required (boolean)
Signals if the proposal is locked or not for updates in order to restrict modifications. Possible values: - True - False
source
Required (string, enum)
The source from where the proposal was created. Can be: [ MERCHANT_CPERSONEL, MERCHANT_API, QUOTE_INTERFACE, SALESFORCE_CPQ ].
Required (create) (object) (ProposalContent)
The content of the proposal.
type
Required (create) (string, enum)
The type of proposal that defines the way it will be processed onwards; Can be [amendment, acquisition].
status
Required (string, enum)
The status of the proposal; can be [ opened, sent, in_review, reviewed, closed_won, closed_lost, declined, expired, accepted ].
statusComment
Required (string)
Free text comments that can accompany a status.
expirationDate
Optional (string)
The date at which the proposal expires; date-time ISO 8601 format.
Required (create) (object) (sellTo)
Represents the entity using the service. Used for tax calculation.
terms
Optional (int)
Can be NULL.
ProposalContent Object
language
Required (create) (string)
The ISO 639-1 language code used to display the content of the proposal.
currency
Required (string)
The ISO 4217 currency code used to display the product and order values.
LineItem Object
productName
Required (string)
Name of the product.
productCode
Required (string)
2Checkout product code.
quantity
Required (float)
The quantity of the product.
price
Required (float)
The list price of the product.
discountPrice
Required (float)
The discounted price of the product.
priceType
Required (string, enum)
The price type, can be gross or net.
subscriptionReference
Optional (string)
The subscription reference for upgrade of renewal.
contractPeriod
Required (integer)
The number of billing cycles. A zero value means a lifetime contract period and billingCycle is not needed in this case.
immediateAction
Optional (string)
Defines if the contract starts now or at the end of the current billing cycle or contract period [ now, end_of_billing_cycle, end_of_contract ].
Optional (object) (billingCycle)
The billing cycle configuration.
Optional (object) (array of priceOption)
Array of selected price options.
Optional (object) (array of additionalField)
Array of Product additional fields.
prorationDate
Optional (string)
ISO8601 format with UTC timezone.
BillingCycle Object
unit
Required (string, enum)
The unit for the billing cycle can be [day, month].
value
Required (integer)
The number of days or months. The minimum for a day unit is 7.
PriceOptions (array of priceOption objects)
groupCode
Required (string)
The price options group code.
groupOptions
Required (array of strings)
Selected group option code.
AdditionalFields - Array of additionalField Object
code
Required (string)
The alpha-numeric characters, underscores, and dashes that are set as the field identifier.
value
Required (string)
Selected field value.
BillTo Object
company
Required (string)
End-user company name.
email
Required (string)
Contact email address.
phone
Required (string)
Contact phone number.
country
Required (string)
The country for the address. Represents the country code as specified by ISO 3166-1 alpha-2. Example: 1849 Cardinal Lane.
state
Required (string)
The country state for the address.
city
Required (string)
The city for the address.
zip
Required (string)
The address zip code.
address
Required (string)
The street address.
tac Object
content
Required (string)
The terms and conditions of the proposal.
acceptedDate
Optional (string)
The UTC date when the proposal terms and conditions were accepted in ISO 8601 format. Example: 2020-01-05T17:21:42+00:00.
SentBy Object
firstName
Required (string)
The first name of the email sender.
lastName
Required (string)
The last name of the email sender.
email
Required (string)
The email address of the email sender.
Links Object
linkId
Required (string)
The unique link id.
url
Required (string)
The link URL for viewing.
status
Required (string, enum)
The status of the proposal. Default: opened.
pdf
Required (string)
The link URL for downloading the PDF.
SellTo Object
company
Required (string)
End-user company name.
email
Required (string)
Contact email address.
vatCode
Optional (string)
For companies, it needs to be the VAT ID.
phone
Required (string)
Contact phone number.
country
Required (string)
The country for the address. Represents the country code as specified by ISO 3166-1 alpha-2.
state
Required (string)
The country state for the address.
city
Required (string)
The city for the address.
zip
Required (string)
The address zip code.
address
Required (string)
The street address.
taxExemptionId
Required (string)
The tax exemption ID code.
Errors
code
Integer
Internal error code.
detail
String
The details of the error associated with the code.
status
Integer'
HTTP error code.
Last updated
Was this helpful?