· 6 years ago · Nov 25, 2019, 03:50 PM
1{
2 "swagger": "2.0",
3 "info": {
4 "title": "Contract",
5 "version": "1.0",
6 "description": "Contains API operations to Get New/Updated contracts from Vista."
7 },
8 "host": "gw.qa.partner.api.volvocars.biz",
9 "basePath": "/contracts",
10 "schemes": [
11 "https"
12 ],
13 "paths": {
14 "/markets/{market}/metaOrderNumbers/{metaOrderNumber}": {
15 "get": {
16 "operationId": "Get Contracts by Meta Order Number",
17 "description": "This service can only be consumed if your subscription key has been configured by Partner API Operations Team. \n\r <a href='https://partnerapimaintenance.blob.core.windows.net/apimanager-docs-qa/IS_GRIP_045%20Interface%20Specification%20Contract.docx'>Download GRIP Interface specification</a>",
18 "parameters": [
19 {
20 "name": "market",
21 "in": "path",
22 "description": "ISO code market",
23 "required": true,
24 "type": "string"
25 },
26 {
27 "name": "metaOrderNumber",
28 "in": "path",
29 "description": "The meta order number to catch contracts for",
30 "required": true,
31 "type": "string"
32 }
33 ],
34 "responses": {
35 "200": {
36 "description": "Contracts by meta order number successfully fetched",
37 "schema": {
38 "$ref": "#/definitions/getSuccessByMetaOrdernumber"
39 }
40 },
41 "400": {
42 "description": "Bad request",
43 "schema": {
44 "$ref": "#/definitions/getBadRequest"
45 }
46 },
47 "401": {
48 "description": "Unauthorized request",
49 "schema": {
50 "$ref": "#/definitions/unauthorized"
51 }
52 },
53 "404": {
54 "description": "Not Found",
55 "schema": {
56 "$ref": "#/definitions/notFound"
57 }
58 },
59 "503": {
60 "description": "Service Unavailable",
61 "schema": {
62 "$ref": "#/definitions/serviceUnavailable"
63 }
64 }
65 },
66 "produces": [
67 "application/json"
68 ],
69 "consumes": [
70 "application/json"
71 ]
72 }
73 },
74 },
75 "definitions": {
76 "getSuccessByMetaOrdernumber": {
77 "type": "object",
78 "properties": {
79 "statusCode": {
80 "type": "number"
81 },
82 "statusMessage": {
83 "type": "string"
84 },
85 "responseDetails": {
86 "type": "object",
87 "properties": {
88 "market": {
89 "type": "string"
90 },
91 "metaOrderNumber": {
92 "type": "string"
93 },
94 "numberOfObjects": {
95 "type": "number"
96 },
97 "contracts": {
98 "type": "array",
99 "items": {
100 "$ref": "#/definitions/contractDefinition"
101 }
102 }
103 }
104 }
105 },
106 "example": {
107 "statusCode": 200,
108 "statusMessage": "OK",
109 "responseDetails": {
110 "market": "FR",
111 "metaOrderNumber": "6347024",
112 "numberOfObjects": 1,
113 "contracts": [
114 {
115 "contractHeader": {
116 "contractNumber": "5094346",
117 "metaOrderNumber": "6347024",
118 "contractCreated": {
119 "date": "2018-12-19",
120 "timeStamp": "2017-12-29T00:00:00Z",
121 "authorisationId": "D-PAUN",
122 "reason": "W"
123 },
124 "contractVersion": {
125 "reason": "W",
126 "date": "2018-02-20",
127 "timeStamp": "2018-02-20T08:45:25Z",
128 "authorisationId": "D-PAUN",
129 "versionNumber": "2"
130 },
131 "currentContractVersion": "2",
132 "contractCancelled": {
133 "date": "2018-02-20",
134 "timeStamp": "TimeStampb76c3ddb-2915-411d-b475-5ba6e3a42667",
135 "authorisationId": "D-PAUN",
136 "versionNumber": "2",
137 "cancelledIndicator": "N"
138 }
139 },
140 "contractDetails": {
141 "customer": [
142 {
143 "id": [
144 {
145 "type": "CustomerID",
146 "value": "21378592"
147 }
148 ],
149 "country": "FR",
150 "relationshipToVehicle": "O",
151 "fleetDetails": {
152 "fin": "1042591",
153 "isPrimary": "true",
154 "localFin": "null"
155 }
156 },
157 {
158 "id": [
159 {
160 "type": "CustomerID",
161 "value": "21444333"
162 }
163 ],
164 "country": "FR",
165 "relationshipToVehicle": "EU",
166 "fleetDetails": {
167 "fin": "1085677",
168 "isPrimary": "false",
169 "localFin": "null"
170 }
171 }
172 ],
173 "partner": [
174 {
175 "type": "Selling",
176 "market": "FF",
177 "country": "FR",
178 "partnerUniqueId": "6FR166231",
179 "partnerId": "6FR166231",
180 "distributorId": "3FR1460",
181 "salesmanCode": "F-COMAND",
182 "salesmanName": "Frédéric COMANDINI"
183 }
184 ],
185 "orderDetails": {
186 "orderNumber": [
187 {
188 "type": "FYON",
189 "value": "640550422"
190 }
191 ],
192 "dealerReferenceNumber": "AUTRET /VF",
193 "vin": "YV1MZ79L0J2155071",
194 "commonOrderType": "2",
195 "brandOrderType": "63",
196 "brandStatusPoint": "17500",
197 "salesmanCode": "F-COMAND",
198 "commonSaleType": "63A",
199 "vehicle": {
200 "vehicleRegistration": {
201 "registrationNumber": "EV-744-BX",
202 "registrationDate": "2018-02-20T00:00:00Z",
203 "registrationType": "M"
204 }
205 }
206 },
207 "distributionChannel": [
208 {
209 "brand": "YV1"
210 }
211 ],
212 "dates": {
213 "contractDate": [
214 {
215 "type": "HandoverDate",
216 "value": "2018-02-19"
217 }
218 ]
219 }
220 }
221 }
222 ]
223 }
224 }
225 },
226 "contractDefinition": {
227 "type": "object",
228 "properties": {
229 "contractHeader": {
230 "type": "object",
231 "properties": {
232 "contractNumber": {
233 "type": "string"
234 },
235 "metaOrderNumber": {
236 "type": "string"
237 },
238 "contractCreated": {
239 "type": "object",
240 "properties": {
241 "date": {
242 "type": "string"
243 },
244 "timeStamp": {
245 "type": "string"
246 },
247 "authorisationId": {
248 "type": "string"
249 },
250 "versionNumber": {
251 "type": "string"
252 },
253 "additionalInfo": {
254 "type": "array",
255 "items": {
256 "type": "object",
257 "properties": {
258 "type": {
259 "type": "string"
260 },
261 "value": {
262 "type": "string"
263 }
264 }
265 }
266 },
267 "reason": {
268 "type": "string"
269 }
270 }
271 },
272 "contractVersion": {
273 "type": "object",
274 "properties": {
275 "date": {
276 "type": "string"
277 },
278 "timeStamp": {
279 "type": "string"
280 },
281 "authorisationId": {
282 "type": "string"
283 },
284 "versionNumber": {
285 "type": "string"
286 },
287 "additionalInfo": {
288 "type": "array",
289 "items": {
290 "type": "object",
291 "properties": {
292 "type": {
293 "type": "string"
294 },
295 "value": {
296 "type": "string"
297 }
298 }
299 }
300 },
301 "reason": {
302 "type": "string"
303 }
304 }
305 },
306 "currentContractVersion": {
307 "type": "string"
308 },
309 "contractCancelled": {
310 "type": "object",
311 "properties": {
312 "cancelledIndicator": {
313 "type": "string"
314 },
315 "date": {
316 "type": "string"
317 },
318 "timeStamp": {
319 "type": "string"
320 },
321 "authorisationId": {
322 "type": "string"
323 },
324 "versionNumber": {
325 "type": "string"
326 },
327 "additionalInfo": {
328 "type": "array",
329 "items": {
330 "type": "object",
331 "properties": {
332 "type": {
333 "type": "string"
334 },
335 "value": {
336 "type": "string"
337 }
338 }
339 }
340 },
341 "reason": {
342 "type": "string"
343 }
344 }
345 },
346 "purchaseOrderNumber": {
347 "type": "string"
348 },
349 "requisitionNumber": {
350 "type": "string"
351 },
352 "freeTextNotes": {
353 "type": "string"
354 },
355 "additionalInfo": {
356 "type": "array",
357 "items": {
358 "type": "object",
359 "properties": {
360 "type": {
361 "type": "string"
362 },
363 "value": {
364 "type": "string"
365 }
366 }
367 }
368 }
369 }
370 },
371 "contractDetails": {
372 "type": "object",
373 "properties": {
374 "customer": {
375 "type": "array",
376 "items": {
377 "type": "object",
378 "properties": {
379 "id": {
380 "type": "array",
381 "items": {
382 "type": "object",
383 "properties": {
384 "type": {
385 "type": "string"
386 },
387 "value": {
388 "type": "string"
389 }
390 }
391 }
392 },
393 "country": {
394 "type": "string"
395 },
396 "relationshipToVehicle": {
397 "type": "string"
398 },
399 "fleetDetails": {
400 "type": "object",
401 "properties": {
402 "fin": {
403 "type": "string"
404 },
405 "isPrimary": {
406 "type": "string"
407 },
408 "localFin": {
409 "type": "string"
410 }
411 }
412 },
413 "additionalInfo": {
414 "type": "array",
415 "items": {
416 "type": "object",
417 "properties": {
418 "type": {
419 "type": "string"
420 },
421 "value": {
422 "type": "string"
423 }
424 }
425 }
426 }
427 }
428 }
429 },
430 "partner": {
431 "type": "array",
432 "items": {
433 "type": "object",
434 "properties": {
435 "market": {
436 "type": "string"
437 },
438 "country": {
439 "type": "string"
440 },
441 "partnerUniqueID": {
442 "type": "string"
443 },
444 "partnerId": {
445 "type": "string"
446 },
447 "distributorID": {
448 "type": "string"
449 },
450 "salesmanCode": {
451 "type": "string"
452 },
453 "salesmanName": {
454 "type": "string"
455 },
456 "salesType": {
457 "type": "string"
458 },
459 "additionalInfo": {
460 "type": "array",
461 "items": {
462 "type": "object",
463 "properties": {
464 "type": {
465 "type": "string"
466 },
467 "value": {
468 "type": "string"
469 }
470 }
471 }
472 },
473 "type": {
474 "type": "string"
475 }
476 }
477 }
478 },
479 "orderDetails": {
480 "type": "object",
481 "properties": {
482 "orderNumber": {
483 "type": "array",
484 "items": {
485 "type": "object",
486 "properties": {
487 "type": {
488 "type": "string"
489 },
490 "value": {
491 "type": "string"
492 }
493 }
494 }
495 },
496 "dealerReferenceNumber": {
497 "type": "string"
498 },
499 "vin": {
500 "type": "string"
501 },
502 "commonOrderType": {
503 "type": "string"
504 },
505 "brandOrderType": {
506 "type": "string"
507 },
508 "brandStatusPoint": {
509 "type": "string"
510 },
511 "salesmanCode": {
512 "type": "string"
513 },
514 "commonSaleType": {
515 "type": "string"
516 },
517 "secondHandoverTypeOfSale": {
518 "type": "string"
519 },
520 "exDemoIndicator": {
521 "type": "string"
522 },
523 "acquiredFrom": {
524 "type": "string"
525 },
526 "transportPriority": {
527 "type": "string"
528 },
529 "consignmentIndicator": {
530 "type": "string"
531 },
532 "vehicle": {
533 "type": "object",
534 "properties": {
535 "vehicleRegistration": {
536 "type": "object",
537 "properties": {
538 "registrationNumber": {
539 "type": "string"
540 },
541 "registrationDate": {
542 "type": "string"
543 },
544 "registrationType": {
545 "type": "string"
546 },
547 "deRegistrationDate": {
548 "type": "string"
549 },
550 "additionalInfo": {
551 "type": "array",
552 "items": {
553 "type": "object",
554 "properties": {
555 "type": {
556 "type": "string"
557 },
558 "value": {
559 "type": "string"
560 }
561 }
562 }
563 }
564 }
565 },
566 "vehicleUsage": {
567 "type": "object",
568 "properties": {
569 "predictedUsage": {
570 "type": "string"
571 },
572 "predictedMileage": {
573 "type": "object",
574 "properties": {
575 "period": {
576 "type": "string"
577 },
578 "unitOfMeasure": {
579 "type": "string"
580 },
581 "value": {
582 "type": "string"
583 }
584 }
585 },
586 "estimateAnnualMileage": {
587 "type": "object",
588 "properties": {
589 "period": {
590 "type": "string"
591 },
592 "unitOfMeasure": {
593 "type": "string"
594 },
595 "value": {
596 "type": "string"
597 }
598 }
599 },
600 "additionalInfo": {
601 "type": "array",
602 "items": {
603 "type": "object",
604 "properties": {
605 "type": {
606 "type": "string"
607 },
608 "value": {
609 "type": "string"
610 }
611 }
612 }
613 }
614 }
615 },
616 "vehicleReplacement": {
617 "type": "object",
618 "properties": {
619 "predictedReplacementDate": {
620 "type": "string"
621 },
622 "predictedReplacementMileage": {
623 "type": "object",
624 "properties": {
625 "period": {
626 "type": "string"
627 },
628 "unitOfMeasure": {
629 "type": "string"
630 },
631 "value": {
632 "type": "string"
633 }
634 }
635 },
636 "replacedRegistrationNumber": {
637 "type": "string"
638 },
639 "vehicleForCollection": {
640 "type": "string"
641 },
642 "additionalInfo": {
643 "type": "array",
644 "items": {
645 "type": "object",
646 "properties": {
647 "type": {
648 "type": "string"
649 },
650 "value": {
651 "type": "string"
652 }
653 }
654 }
655 }
656 }
657 },
658 "additionalInfo": {
659 "type": "array",
660 "items": {
661 "type": "object",
662 "properties": {
663 "type": {
664 "type": "string"
665 },
666 "value": {
667 "type": "string"
668 }
669 }
670 }
671 }
672 }
673 },
674 "handlingDealer": {
675 "type": "string"
676 },
677 "additionalInfo": {
678 "type": "array",
679 "items": {
680 "type": "object",
681 "properties": {
682 "type": {
683 "type": "string"
684 },
685 "value": {
686 "type": "string"
687 }
688 }
689 }
690 }
691 }
692 },
693 "finance": {
694 "type": "object",
695 "properties": {
696 "purchaseMethod": {
697 "type": "string"
698 },
699 "paymentType": {
700 "type": "string"
701 },
702 "financePlanType": {
703 "type": "string"
704 },
705 "leasingFinanceDuration": {
706 "type": "string"
707 },
708 "employeeSaleListPriceNet": {
709 "type": "string"
710 },
711 "employeeSaleDiscountNet": {
712 "type": "string"
713 },
714 "financeContractDate": {
715 "type": "object",
716 "properties": {
717 "type": {
718 "type": "string"
719 },
720 "value": {
721 "type": "string"
722 }
723 }
724 },
725 "partExchange": {
726 "type": "object",
727 "properties": {
728 "manufacturer": {
729 "type": "string"
730 },
731 "model": {
732 "type": "string"
733 },
734 "modelYear": {
735 "type": "string"
736 },
737 "bodyStyle": {
738 "type": "string"
739 },
740 "engineType": {
741 "type": "string"
742 },
743 "fuelType": {
744 "type": "string"
745 },
746 "vehicleSegment": {
747 "type": "string"
748 }
749 }
750 },
751 "leases": {
752 "type": "array",
753 "items": {
754 "type": "object",
755 "properties": {
756 "leaseContractNumber": {
757 "type": "string"
758 },
759 "leasePeriod": {
760 "type": "string"
761 },
762 "additionalInfo": {
763 "type": "array",
764 "items": {
765 "type": "object",
766 "properties": {
767 "type": {
768 "type": "string"
769 },
770 "value": {
771 "type": "string"
772 }
773 }
774 }
775 }
776 }
777 }
778 },
779 "additionalInfo": {
780 "type": "array",
781 "items": {
782 "type": "object",
783 "properties": {
784 "type": {
785 "type": "string"
786 },
787 "value": {
788 "type": "string"
789 }
790 }
791 }
792 }
793 }
794 },
795 "distributionChannel": {
796 "type": "array",
797 "items": {
798 "type": "object",
799 "properties": {
800 "brand": {
801 "type": "string"
802 }
803 }
804 }
805 },
806 "dates": {
807 "type": "object",
808 "properties": {
809 "contractDate": {
810 "type": "array",
811 "items": {
812 "type": "object",
813 "properties": {
814 "type": {
815 "type": "string"
816 },
817 "value": {
818 "type": "string"
819 }
820 }
821 }
822 },
823 "customerPromisedHandoverDate": {
824 "type": "string"
825 },
826 "plannedDropOffDate": {
827 "type": "string"
828 },
829 "confirmedDeliveryDateTime": {
830 "type": "string"
831 },
832 "estimatedHandOverWeek": {
833 "type": "string"
834 }
835 }
836 },
837 "marketing": {
838 "type": "object",
839 "properties": {
840 "marketingProgram": {
841 "type": "array",
842 "items": {
843 "type": "object",
844 "properties": {
845 "type": {
846 "type": "string"
847 },
848 "value": {
849 "type": "string"
850 }
851 }
852 }
853 },
854 "language": {
855 "type": "string"
856 },
857 "additionalInfo": {
858 "type": "array",
859 "items": {
860 "type": "object",
861 "properties": {
862 "type": {
863 "type": "string"
864 },
865 "value": {
866 "type": "string"
867 }
868 }
869 }
870 }
871 }
872 },
873 "previousVehicle": {
874 "type": "object",
875 "properties": {
876 "manufacturer": {
877 "type": "string"
878 },
879 "model": {
880 "type": "string"
881 },
882 "disposalMethod": {
883 "type": "string"
884 }
885 }
886 },
887 "employeeName": {
888 "type": "string"
889 },
890 "location": {
891 "type": "string"
892 },
893 "businessCase": {
894 "type": "string"
895 },
896 "aPlanPin": {
897 "type": "string"
898 },
899 "employeeNumber": {
900 "type": "string"
901 },
902 "primaryInternalCustomer": {
903 "type": "string"
904 },
905 "nominatedUser": {
906 "type": "string"
907 },
908 "plannedDropOffLocation": {
909 "type": "string"
910 },
911 "customerOrderReferenceNumber": {
912 "type": "string"
913 },
914 "tradeInDetails": {
915 "type": "array",
916 "items": {
917 "type": "object",
918 "properties": {
919 "tradeInModelYear": {
920 "type": "string"
921 },
922 "tradeInBrand": {
923 "type": "string"
924 },
925 "tradeInModelType": {
926 "type": "string"
927 },
928 "tradeInVariant": {
929 "type": "string"
930 },
931 "tradeInVin": {
932 "type": "string"
933 }
934 }
935 }
936 },
937 "additionalInfo": {
938 "type": "array",
939 "items": {
940 "type": "object",
941 "properties": {
942 "type": {
943 "type": "string"
944 },
945 "value": {
946 "type": "string"
947 }
948 }
949 }
950 }
951 }
952 }
953 }
954 },
955 "getBadRequest": {
956 "type": "object",
957 "properties": {
958 "statusCode": {
959 "type": "integer"
960 },
961 "statusMessage": {
962 "type": "string"
963 },
964 "errorMessage": {
965 "type": "string"
966 },
967 "responsibleSystem": {
968 "type": "string"
969 }
970 },
971 "example": {
972 "statusCode": 400,
973 "statusMessage": "Bad Request",
974 "errorMessage": "The dealer subscription key doesn't have a matching dealer id",
975 "responsibleSystem": "Consuming System"
976 }
977 },
978 "unauthorized": {
979 "type": "object",
980 "properties": {
981 "statusCode": {
982 "type": "integer"
983 },
984 "statusMessage": {
985 "type": "string"
986 },
987 "errorMessage": {
988 "type": "string"
989 },
990 "responsibleSystem": {
991 "type": "string"
992 }
993 },
994 "example": {
995 "statusCode": 401,
996 "statusMessage": "Unauthorized",
997 "errorMessage": "The provided token has expired.",
998 "responsibleSystem": "Consuming System"
999 }
1000 },
1001 "notFound": {
1002 "type": "object",
1003 "properties": {
1004 "statusCode": {
1005 "type": "integer"
1006 },
1007 "statusMessage": {
1008 "type": "string"
1009 },
1010 "errorMessage": {
1011 "type": "string"
1012 },
1013 "responsibleSystem": {
1014 "type": "string"
1015 }
1016 },
1017 "example": {
1018 "statusCode": 404,
1019 "statusMessage": "Not Found",
1020 "errorMessage": "No contracts matching the parameters was found",
1021 "responsibleSystem": "Consuming System"
1022 }
1023 },
1024 "serviceUnavailable": {
1025 "type": "object",
1026 "properties": {
1027 "statusCode": {
1028 "type": "integer"
1029 },
1030 "statusMessage": {
1031 "type": "string"
1032 },
1033 "errorMessage": {
1034 "type": "string"
1035 },
1036 "responsibleSystem": {
1037 "type": "string"
1038 }
1039 },
1040 "example": {
1041 "statusCode": 503,
1042 "statusMessage": "Service Unavailable",
1043 "errorMessage": "The request could not be processed.",
1044 "responsibleSystem": "GRIP"
1045 }
1046 }
1047 }
1048}