OrderPeriods - v1

Description

This service, is optional. You do not have to use this service.

This service should be used if you would like to set the recurrence/periodic information of orders. If there are orders which should be repeated daily or weekly or monthly with specified time intervals, number of occurrences, etc. you can use this service to set the recurrence details of each order.

Input

  1. apiKey: In order to obtain your API KEY, first log into logvrp web application and click "Manage API Key" button.
  2. computationTicketID: You will get this using Ticket service.
  3. orderPeriods: Array of "OrderPeriod" where "OrderPeriod" is defined as follows:
    1. OrderId: String. The Id of the order that periodic information to be set. This order id must exist in the order list provided in the "Orders" service.
    2. type: An Integer value. non-periodic: 0, hourly:1, daily: 2, weekly: 3, monthly: 4, yearly: 5.
    3. startDate: A string in the format, "\/Date( t ) \/". Defines when the recurrence starts.
    4. endDate: A string in the format, "\/Date( t ) \/". Defines when the recurrence ends.
    5. endAfterNTimes: Integer value. Recurrence will end after N occurrences. If you already set endDate, then specify this as 0.
    6. everyNyears: Integer. Defaults to 0. If every N years this order has to repeat, then specify non-zero.
    7. everyNmonths: Integer. Defaults to 0. If every N months this order has to repeat, then specify non-zero.
    8. months: An array of Integer values. Defaults to null. For example, [3, 7, 12] for months 3, 6 and 12.
    9. startMonthOfYear: An Integer. Defaults to 0. At which month of the year the recurrence of the order will start. Values should be between 1 and 12.
    10. everyNweeks: Integer. Defaults to 0. If every N weeks this order has to repeat, then specify non-zero.
    11. weeks: An array of Integer values. Defaults to null. Based on the period type (monthly or yearly) the values can be between 1-4 or 1-52. For monthly periods: Array of 1, 2, 3, 4. Examples: [1,3], [2, 4]. For yearly periods, specifies the week of year. Min:1, Max: 52. Example: [1,5,9,13,18,22,25,52]
    12. startWeekOfMonth: An Integer. Defaults to 0. At which week of the month the recurrence of the order will start. Values should be between 1 and 4.
    13. startWeekOfYear: An Integer. Defaults to 0. At which week of the year the recurrence of the order will start. Values should be between 1 and 52.
    14. everyNdays: Integer. Defaults to 0. If every N days this order has to repeat, then specify non-zero.
    15. days: An array of Integer values. Defaults to null. Based on the period type (weekly, monthly or yearly) the values can be between 1-7, 1-31 or 1-365. For weekly periods, some examples: {Monday, Wednesday, Friday} = [1,3,6], {Monday, Wednesday, Friday} = [1,3,5], {Monday, Thursday, Saturday} = [1, 4, 6]. For monthly periods, an example:[1,5,9,13,18,22,25,28]. For yearly periods an example: [35,75,90,135,180,220,257,289,362]
    16. startDayOfWeek: An Integer. Defaults to 0. At which day of the week the recurrence of the order will start. Values should be between 1 and 7.
    17. startDayOfMonth: An Integer. Defaults to 0. At which day of the month the recurrence of the order will start. Values should be between 1 and 31 based on the month.
    18. startDayOfYear: An Integer. Defaults to 0. At which day of the year the recurrence of the order will start. Values should be between 1 and 365.
    19. dayInterval: An Integer. Defaults to 0. Between each recurrence, if there should be at least some interval days, then specify this value.
    20. nDays: An Integer. Defaults to 0. How many days this order has to repeated within the specified period.

Output

Data: Returned data
Message: Output message
ReturnCode: Return code of the output. If "Success" is true, then check this value.
Success: If unpected errors, or exceptions occur, this will be false.
success: Same as Success

REST - JSON

URL
Input
Body

{

"apiKey": "your API key here",

"computationTicketID": "your computation ticket here",

"orderPeriods": [

{

OrderId: "54321",

type: 2,

startDate: "\/Date(1282984200000)\/",

endDate: "\/Date(1282985100000)\/",

endAfterNTimes: 0,

everyNmonths: 0,

months: null,

startMonthOfYear: 0,

everyNweeks: 0,

weeks: 0,

startWeekOfMonth: 0,

startWeekOfYear: 0,

everyNdays: 0,

days: [

1,

2,

3,

4,

5,

6

],

startDayOfWeek: 0,

startDayOfMonth: 0,

startDayOfYear: 0,

dayInterval: 0,

nDays: 0

},

{

OrderId: "12345",

type: 2,

startDate: "\/Date(1282984200000)\/",

endDate: "\/Date(1282985100000)\/",

endAfterNTimes: 0,

everyNmonths: 0,

months: null,

startMonthOfYear: 0,

everyNweeks: 0,

weeks: 0,

startWeekOfMonth: 0,

startWeekOfYear: 0,

everyNdays: 0,

days: [

1,

2,

3,

4,

5,

6

],

startDayOfWeek: 0,

startDayOfMonth: 0,

startDayOfYear: 0,

dayInterval: 0,

nDays: 0

}

]

}

Headers
Content-Type: application/json
Method:
POST
Output
Response
{
"Data": null,
"Message": null,
"ReturnCode": 0,
"Success": true,
"success": true
}