Api doc


SDK's


Api Modules

sales.budget

Manage individual budget setting



Supported Methods:

GET
Params
  • token (Required): valid token
  • start_date (Required): date
  • end_date (Required): date
  • location: integer


UPDATE
Params
  • token (Required): valid token
  • start_date (Required): date
  • end_date (Required): date
  • hours: integer
  • dollars: integer
  • location: integer


DELETE
Params
  • token (Required): valid token
  • start_date (Required): date
  • end_date (Required): date
  • location: integer


CREATE
Params
  • token (Required): valid token
  • start_date (Required): date
  • end_date (Required): date
  • hours: integer
  • dollars: integer
  • location: integer
  • position: integer


Documentation

GET
Returns specific budget settings for a given time period and location.
Level 3 is required.

--

Parameters:

  1. "start_date": required //Start date (date)
  2. "end_date": required //End date (date)
  3. "location": accepted //Location id (integer)
  4. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "module":"sales.budget",
  3. "method":"GET",
  4. "request":{
  5. "start_date":"May 19, 2012",
  6. "end_date":"May 21, 2012",
  7. "location":"15"
  8. }
  9. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "id":"645",
  5. "store":"11",
  6. "start_date":{
  7. "id":"1545",
  8. "month":"5",
  9. "day":"19",
  10. "year":"2012",
  11. "weekday":"Mon",
  12. "mname":"May",
  13. "week":"21",
  14. "dayid":"2",
  15. "formatted":"May 19, 2012"
  16. },
  17. "end_date":{
  18. "id":"1556",
  19. "month":"5",
  20. "day":"21",
  21. "year":"2012",
  22. "weekday":"Fri",
  23. "mname":"May",
  24. "week":"21",
  25. "dayid":"5",
  26. "formatted":"May 21, 2012"
  27. },
  28. "location":"15",
  29. "hours":"8.00",
  30. "dolars":"0.00"
  31. },
  32. "token":"xxxxxxx"
  33. }

---

CREATE
Creates specific budget settings for a given time period and location.
Level 3 is required.

--

Parameters:

  1. "start_date": required //Start date (date)
  2. "end_date": required //End date (date)
  3. "location": accepted //Location id (integer)
  4. "hours": accepted //Working hours (integer)
  5. "dollars": accepted //Dollars (integer)
  6. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "module":"sales.budget",
  3. "method":"CREATE",
  4. "request":{
  5. "start_date":"May 19, 2012",
  6. "end_date":"May 21, 2012",
  7. "location":"38",
  8. "hours":"8.00",
  9. "dolars":"80.00"
  10. }
  11. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "id":"645",
  5. "store":"11",
  6. "start_date":{
  7. "id":"1545",
  8. "month":"5",
  9. "day":"19",
  10. "year":"2012",
  11. "weekday":"Mon",
  12. "mname":"May",
  13. "week":"21",
  14. "dayid":"2",
  15. "formatted":"May 19, 2012"
  16. },
  17. "end_date":{
  18. "id":"1556",
  19. "month":"5",
  20. "day":"21",
  21. "year":"2012",
  22. "weekday":"Fri",
  23. "mname":"May",
  24. "week":"21",
  25. "dayid":"5",
  26. "formatted":"May 21, 2012"
  27. },
  28. "location":"38",
  29. "hours":"8.00",
  30. "dolars":"0.00"
  31. },
  32. "token":"xxxxxxx"
  33. }

---

UPDATE
Updates specific budget settings for a given time period and location.
Level 3 is required.

--

Parameters:

  1. "start_date": required //Start date (date)
  2. "end_date": required //End date (date)
  3. "location": accepted //Location id (integer)
  4. "hours": accepted //Working hours (integer)
  5. "dollars": accepted //Dollars (integer)
  6. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "module":"sales.budget",
  3. "method":"UPDATE",
  4. "request":{
  5. "start_date":"May 19, 2012",
  6. "end_date":"May 21, 2012",
  7. "location":"15",
  8. "hour":"8.00",
  9. "dolars":"80.00"
  10. }
  11. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "id":"645",
  5. "store":"11",
  6. "start_date":{
  7. "id":"1545",
  8. "month":"5",
  9. "day":"19",
  10. "year":"2012",
  11. "weekday":"Mon",
  12. "mname":"May",
  13. "week":"21",
  14. "dayid":"2",
  15. "formatted":"May 19, 2012"
  16. },
  17. "end_date":{
  18. "id":"1556",
  19. "month":"5",
  20. "day":"21",
  21. "year":"2012",
  22. "weekday":"Fri",
  23. "mname":"May",
  24. "week":"21",
  25. "dayid":"5",
  26. "formatted":"May 21, 2012"
  27. },
  28. "location":"15",
  29. "hour":"8.00",
  30. "dolars":"80.00"
  31. },
  32. "token":"xxxxxxx"
  33. }

---

DELETE
Deletes specific budget settings for a given time period and location.
Level 3 is required.

--

Parameters:

  1. "start_date": required //Start date (date)
  2. "end_date": required //End date (date)
  3. "location": accepted //Location id (integer)
  4. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "module":"sales.budget",
  3. "method":"DELETE",
  4. "request":{
  5. "start_date":"May 19, 2012",
  6. "end_date":"May 21, 2012",
  7. "location":"15"
  8. }
  9. }

Example Response:

  1. {
  2. "status":1,
  3. "data":"",
  4. "token":"xxxxxxx"
  5. }