Quote API v2

From Memsource
Jump to: navigation, search

Create New Quote

action: api/v2/quote/create
    token                       string
    name                        string
    project                     domain(Project)
    analyse                     domain(Analyse)
    priceList                   domain(PriceList)
    discountScheme              domain(DiscountScheme)      O
    workflowStep                list(domain(WorkflowStep))  O
                        

response: JSON
    {
      "id": 238                 // id of the new quote
    }

Get Quote

action: api/v2/quote/get
    token                       string
    quote                       domain(Quote)

response: JSON
   {
     "id":1,
     "name":"Quote",
     "status":"NEW",
     "currency":"USD",
     "billingUnit":"Word",
     "createdBy":{
       "id":1,
       "firstName":"admin",
       "lastName":"test",
       "userName":"admin",
       "email":"test@test.com",
       "role":"ADMIN",
       "timezone":"Europe/London",
       "active":true,
       "deleted":false,
       "terminologist":false,
       "dateCreated":"2017-01-05T15:42:20+0000"
     },
     "dateCreated":"2017-01-05T15:42:54+0000",
     "totalPrice":0.0
   }

Delete Quote

action: api/v2/quote/delete
    token                       string
    quote                       domain(Quote)

response: empty