Skip to content

Latest commit

 

History

History
839 lines (532 loc) · 24.3 KB

CommercialApi.md

File metadata and controls

839 lines (532 loc) · 24.3 KB

MissionControl.CommercialApi

All URIs are relative to https://mc.zaikio.com/api/v1/

Method HTTP request Description
orderLineItemsOrderLineItemIdDelete DELETE /order_line_items/{order_line_item_id}
orderLineItemsOrderLineItemIdGet GET /order_line_items/{order_line_item_id}
orderLineItemsOrderLineItemIdPatch PATCH /order_line_items/{order_line_item_id}
ordersGet GET /orders
ordersOrderIdAddressDelete DELETE /orders/{order_id}/address
ordersOrderIdAddressGet GET /orders/{order_id}/address
ordersOrderIdAddressPatch PATCH /orders/{order_id}/address
ordersOrderIdAddressPost POST /orders/{order_id}/address
ordersOrderIdDelete DELETE /orders/{order_id}
ordersOrderIdGet GET /orders/{order_id}
ordersOrderIdOrderLineItemsGet GET /orders/{order_id}/order_line_items
ordersOrderIdOrderLineItemsPost POST /orders/{order_id}/order_line_items
ordersOrderIdPatch PATCH /orders/{order_id}
ordersOrderIdPaymentTermsDelete DELETE /orders/{order_id}/payment_terms
ordersOrderIdPaymentTermsGet GET /orders/{order_id}/payment_terms
ordersOrderIdPaymentTermsPatch PATCH /orders/{order_id}/payment_terms
ordersOrderIdPaymentTermsPost POST /orders/{order_id}/payment_terms
ordersPost POST /orders

orderLineItemsOrderLineItemIdDelete

orderLineItemsOrderLineItemIdDelete(orderLineItemId)

Removes or specific order line item. Please not that removing line items is only possible if the parent order is still in a `draft` state. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let orderLineItemId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.orderLineItemsOrderLineItemIdDelete(orderLineItemId).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
orderLineItemId String

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

orderLineItemsOrderLineItemIdGet

OrderLineItem orderLineItemsOrderLineItemIdGet(orderLineItemId)

Returns a specific order line item. - needed bearer: `Organization` or `Person` - needed scopes: `mission_control.orders.r`

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let orderLineItemId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.orderLineItemsOrderLineItemIdGet(orderLineItemId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
orderLineItemId String

Return type

OrderLineItem

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

orderLineItemsOrderLineItemIdPatch

OrderLineItem orderLineItemsOrderLineItemIdPatch(body, orderLineItemId)

Modifies a specfic order line item. Please not that any modifications to order line items are only possible as long as the parent order is in a `draft` state. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let body = new MissionControl.OrderLineItemsOrderLineItemIdBody(); // OrderLineItemsOrderLineItemIdBody | 
let orderLineItemId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.orderLineItemsOrderLineItemIdPatch(body, orderLineItemId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body OrderLineItemsOrderLineItemIdBody
orderLineItemId String

Return type

OrderLineItem

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ordersGet

[Order] ordersGet(opts)

Returns all orders that have already been confirmed. - needed bearer: `Organization` or `Person` - needed scopes: `mission_control.orders.r`

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let opts = { 
  'page': 56, // Number | The page of the current collection that shall be returned
  'perPage': 100 // Number | The maximum number of items included in the response, ie., the page size
};
apiInstance.ordersGet(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
page Number The page of the current collection that shall be returned [optional]
perPage Number The maximum number of items included in the response, ie., the page size [optional] [default to 100]

Return type

[Order]

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

ordersOrderIdAddressDelete

ordersOrderIdAddressDelete(orderId)

Removes the address from a specific order as long as the order is in a `draft` state. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdAddressDelete(orderId).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
orderId String

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

ordersOrderIdAddressGet

Address ordersOrderIdAddressGet(orderId)

Returns the address for this order. - needed bearer: `Organization` or `Person` - needed scopes: `mission-control.orders.r`

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdAddressGet(orderId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
orderId String

Return type

Address

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

ordersOrderIdAddressPatch

Address ordersOrderIdAddressPatch(body, orderId)

Modifies the address from a specific order as long as the order is still in a `draft` state. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let body = new MissionControl.OrderIdAddressBody1(); // OrderIdAddressBody1 | 
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdAddressPatch(body, orderId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body OrderIdAddressBody1
orderId String

Return type

Address

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ordersOrderIdAddressPost

Address ordersOrderIdAddressPost(body, orderId)

Creates new address. If an address is already present, it will be overwritten. Creating an address is only possible as long as the order is in a `draft` state. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let body = new MissionControl.OrderIdAddressBody(); // OrderIdAddressBody | 
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdAddressPost(body, orderId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body OrderIdAddressBody
orderId String

Return type

Address

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ordersOrderIdDelete

ordersOrderIdDelete(orderId)

Removes a specific order as long as it still is in `draft` state, otherwise the order is set to the `canceled` state. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdDelete(orderId).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
orderId String

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

ordersOrderIdGet

InlineResponse2012 ordersOrderIdGet(orderId)

Returns a specific order, including the address, payment terms and line items. - needed bearer: `Organization` or `Person` - needed scopes: `mission_control.orders.r`

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdGet(orderId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
orderId String

Return type

InlineResponse2012

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

ordersOrderIdOrderLineItemsGet

[OrderLineItem] ordersOrderIdOrderLineItemsGet(orderId, opts)

Returns all line item of a specific order. - needed bearer: `Organization` or `Person` - needed scopes: `mission_control.orders.r`

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 
let opts = { 
  'page': 56, // Number | The page of the current collection that shall be returned
  'perPage': 100 // Number | The maximum number of items included in the response, ie., the page size
};
apiInstance.ordersOrderIdOrderLineItemsGet(orderId, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
orderId String
page Number The page of the current collection that shall be returned [optional]
perPage Number The maximum number of items included in the response, ie., the page size [optional] [default to 100]

Return type

[OrderLineItem]

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

ordersOrderIdOrderLineItemsPost

OrderLineItem ordersOrderIdOrderLineItemsPost(body, orderId)

Creates a new order line item and attaches it to an order. Please note that line items can only be added to orders in a `draft` state. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let body = new MissionControl.OrderIdOrderLineItemsBody(); // OrderIdOrderLineItemsBody | 
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdOrderLineItemsPost(body, orderId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body OrderIdOrderLineItemsBody
orderId String

Return type

OrderLineItem

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ordersOrderIdPatch

InlineResponse2012 ordersOrderIdPatch(body, orderId)

Modifies a specific order. Please note that changes are only possible while the order is in `draft` state. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let body = new MissionControl.OrdersOrderIdBody(); // OrdersOrderIdBody | 
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdPatch(body, orderId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body OrdersOrderIdBody
orderId String

Return type

InlineResponse2012

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ordersOrderIdPaymentTermsDelete

ordersOrderIdPaymentTermsDelete(orderId)

Removes the payment terms. Removing the payment terms is only possible while the order is still in a `draft` state. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdPaymentTermsDelete(orderId).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
orderId String

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

ordersOrderIdPaymentTermsGet

PaymentTerms ordersOrderIdPaymentTermsGet(orderId)

Returns the payment terms for the specified order. - needed bearer: `Organization` or `Person` - needed scopes: `mission_control.orders.r`

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdPaymentTermsGet(orderId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
orderId String

Return type

PaymentTerms

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

ordersOrderIdPaymentTermsPatch

PaymentTerms ordersOrderIdPaymentTermsPatch(body, orderId)

Modifies existing payment terms for the specified order. If payment terms already exist they will be overwritten. Creating payment terms is only possible as long as the order is in a `draft` state. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let body = new MissionControl.OrderIdPaymentTermsBody1(); // OrderIdPaymentTermsBody1 | 
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdPaymentTermsPatch(body, orderId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body OrderIdPaymentTermsBody1
orderId String

Return type

PaymentTerms

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ordersOrderIdPaymentTermsPost

PaymentTerms ordersOrderIdPaymentTermsPost(body, orderId)

Creates a new payment terms for the specified order. If payment terms already exist they will be overwritten. Creating payment terms is only possible as long as the order is in a `draft` state. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let body = new MissionControl.OrderIdPaymentTermsBody(); // OrderIdPaymentTermsBody | 
let orderId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // String | 

apiInstance.ordersOrderIdPaymentTermsPost(body, orderId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body OrderIdPaymentTermsBody
orderId String

Return type

PaymentTerms

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

ordersPost

InlineResponse2012 ordersPost(body)

Creates a new order with the given properties. The order will be in state `draft` and can be modified as long as that is the case. You can also supply nested properties for line items and the address. - needed bearer: `Organization` or `Person` - needed scopes:

Example

import {MissionControl} from 'mission_control';
let defaultClient = MissionControl.ApiClient.instance;


let apiInstance = new MissionControl.CommercialApi();
let body = new MissionControl.OrdersBody(); // OrdersBody | 

apiInstance.ordersPost(body).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body OrdersBody

Return type

InlineResponse2012

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json