PostServiceConfirmationcXML (POST)

Overview

This POST API allows pushing Service Confirmation posted in ERP into GEP SMART for further processing.

 

URL Format: https://api-smartqc.gep.com/SmartInterfaceAPI/api/ServiceConfirmation/ServiceConfirmationDetails

Request
{
   "serviceConfirmationRequestHeader": {
      "serviceConfirmationNumber": "string",
      "partnerServiceConfirmationNumber": "string",
      "description": "string",
      "operation": "string",
      "orderNumber": "string",
      "orderName": "string",
      "currency": "string",
      "submittedBy": "string",
      "submittedOn": "2020-05-28T13:26:07.239Z",
      "serviceConfirmationName": "string",
      "serviceConfirmationStatus": "string",
      "serviceConfirmationApprover": "string",
      "createdBy": "string",
      "totalAmount": 0,
      "clientPartnerCode": "string",
      "serviceStartDate": "2020-05-28T13:26:07.239Z",
      "serviceEndDate": "2020-05-28T13:26:07.239Z",
      "workLocation": "string",
      "headerComments": [
         {
            "commentText": "string",
            "accessType": "string",
            "commentAttachment": [
               {
                  "fileName": "string",
                  "fileUri": "string",
                  "extension": "string",
                  "contentTransferEncoding": "string",
                  "attachmentData": "string"
               }
            ]
         }
      ],
      "headerEntity": [
         {
            "entityCode": "string",
            "isDefault": true,
            "entityType": "string",
            "lobEntityCode": "string"
         }
      ],
      "lob": {
         "entityCode": "string",
         "isDefault": true,
         "entityType": "string",
         "lobEntityCode": "string"
      },
      "sourceSystem": "string",
      "serviceConfirmationDate": "2020-05-28T13:26:07.240Z",
      "fieldSupervisorID": "string",
      "originatingSourceSystem": "string",
      "isERS": true,
      "tax": 0
   },
   "serviceConfirmationOrder": {
      "orderID": "string",
      "serviceConfirmationItem": [
         {
            "serviceConfirmationLineNumber": 0,
            "description": "string",
            "quantity": 0,
            "unitOfMeasure": "string",
            "unitPrice": 0,
            "poLineNumber": 0,
            "itemType": "string",
            "itemExtendedType": "string",
            "contractNumber": "string",
            "categoryName": "string",
            "serviceStartDate": "2020-05-28T13:26:07.240Z",
            "serviceEndDate": "2020-05-28T13:26:07.240Z",
            "consumedDate": "2020-05-28T13:26:07.240Z",
            "manufacturerPartID": "string",
            "manufacturerName": "string",
            "supplierPartID": "string",
            "subLine": 0,
            "scParentLine": 0,
            "serviceLocation": {
               "locationName": "string",
               "locationNumber": "string",
               "address": {
                  "addressline1": "string",
                  "addressline2": "string",
                  "addressline3": "string",
                  "city": "string",
                  "zipCode": "string",
                  "stateInfo": {
                     "stateAbbrevationCode": "string",
                     "stateName": "string"
                  },
                  "countryInfo": {
                     "countryCode": "string",
                     "countryName": "string"
                  },
                  "phoneNo1": "string",
                  "extenstionNo1": "string",
                  "phoneNo2": "string",
                  "extenstionNo2": "string",
                  "mobileNo": "string",
                  "faxNo": "string",
                  "county": "string"
               },
               "deliverTo": "string",
               "registrationDetails": [
                  {
                     "companyIdentificationDisplayName": "string",
                     "companyIdentification": "string"
                  }
               ]
            },
            "itemSplit": [
               {
                  "itemSplitEntities": [
                     {
                        "id": "string",
                        "name": "string",
                        "description": "string"
                     }
                  ],
                  "charge": 0,
                  "splitType": "string",
                  "name": "string",
                  "quantity": 0,
                  "percentage": 0
               }
            ],
            "lineComment": [
               {
                  "commentText": "string",
                  "accessType": "string",
                  "commentAttachment": [
                     {
                        "fileName": "string",
                        "fileUri": "string",
                        "extension": "string",
                        "contentTransferEncoding": "string",
                        "attachmentData": "string"
                     }
                  ]
               }
            ],
            "agreementID": "string",
            "tax": 0,
            "supplierPersonalName": "string" 
         }
      ]
   }
}

 

Response
{,

   "data": {},
   "statusCode": "String",
   "errorDetails": [
      {
         "key": "string",
         "errors": [
            {
               "errorCode": "string",
               "errorDescription": "string"
            }
         ]
      }
   ],
   "successDetails": [
      {
         "key": "String"
      }
   ]
}

 

Examples

Success Scenario - Request 

Request below describes that this contains  only the mandatory attributes:

{
   "ServiceConfirmationRequestHeader": {
      "PartnerServiceConfirmationNumber": "SC_28_05_20_4",
      "ServiceConfirmationNumber": "SC_28_05_20_4",
      "Currency": "USD",
      "SubmittedOn": "0001-01-01T00:00:00",
      "ServiceConfirmationName": "BATCH Test Bulk Upload - Copy - Copy - Copy",
      "ServiceConfirmationStatus": "Approved",
      "CreatedBy": "123@gep.com",
      "TotalAmount": 0,
      "ClientPartnerCode": "0050007745",
      "ServiceStartDate": "2020-05-05T16:00:00",
      "ServiceEndDate": "2020-05-05T16:00:00",
      "WorkLocation": "dfsd",
      "HeaderComments": [
         {
            "CommentText": "Header level comments %1%"
         }
      ],
      "HeaderEntity": [
         {
            "EntityCode": "PC2",
            "IsDefault": false
         },
         {
            "EntityCode": "ElSegundo",
            "IsDefault": false
         },
         {
            "EntityCode": "ElSegundo-0061",
            "IsDefault": false
         },
         {
            "EntityCode": "0061",
            "IsDefault": false
         },
         {
            "EntityCode": "DRES",
            "IsDefault": false
         },
         {
            "EntityCode": "DPDS",
            "IsDefault": false
         },
         {
            "EntityCode": "3A2",
            "IsDefault": false
         }
      ],
      "ServiceConfirmationDate": "2020-05-14T16:40:40.107",
      "FieldSupervisorID": "CC-2020.005019",
      "originatingSourceSystem": "Maximo",
      "IsERS": true,
      "Tax": 2
   },
   "ServiceConfirmationOrder": {
      "OrderID": "0060204151-001",
      "ServiceConfirmationItem": [
         {
            "ServiceConfirmationLineNumber": 1,
            "Description": "Test Smart Flow 30121",
            "Quantity": 1,
            "UnitOfMeasure": "EA",
            "UnitPrice": 10,
            "POLineNumber": 1,
            "ItemType": "Material",
            "ItemExtendedType": "Material",
            "CategoryName": "53A",
            "ServiceStartDate": "2020-05-05T16:00:00",
            "ServiceEndDate": "2020-05-05T16:00:00",
            "ConsumedDate": "2020-05-05T16:00:00",
            "SupplierPartID": "1",
            "SubLine": 1,
            "ScParentLine": 1,
            "ServiceLocation": {
               "LocationName": "Chevron Products Co.",
               "Address": {
                  "Addressline1": "13215 N. Promenade Blvd.",
                  "City": "Stafford",
                  "ZipCode": "77477",
                  "StateInfo": {
                     "StateAbbrevationCode": "TX"
                  },
                  "CountryInfo": {
                     "CountryCode": "US",
                     "CountryName": "United States"
                  }
               },
               "RegistrationDetails": []
            },
            "ItemSplit": [
               {
                  "ItemSplitEntities": [],
                  "Charge": 6,
                  "SplitType": "Percentage",
                  "Quantity": 0.5,
                  "Percentage": 50
               },
               {
                  "ItemSplitEntities": [],
                  "Charge": 3,
                  "SplitType": "Percentage",
                  "Quantity": 0.25,
                  "Percentage": 25
               },
               {
                  "ItemSplitEntities": [],
                  "Charge": 3,
                  "SplitType": "Percentage",
                  "Quantity": 0.25,
                  "Percentage": 25
               }
            ],
            "LineComment": [
               {
                  "CommentText": "Line level comments %1%"
               }
            ],
            "Tax": 2
         }
      ]
   }
}

Success Scenario - Response 

{
   "data": null,
   "statusCode": "200",
   "errorDetails": [],
   "successDetails": [
      {
         "key": "SC_28_05_20_4"
      }
   ]
}

Error Scenario - Request 
Request below depicted does not contain ordered which is a mandatory field.

{
   "ServiceConfirmationRequestHeader": {
      "PartnerServiceConfirmationNumber": "SC_28_05_20_4",
      "ServiceConfirmationNumber": "SC_28_05_20_4",
      "Currency": "USD",
      "SubmittedOn": "0001-01-01T00:00:00",
      "ServiceConfirmationName": "BATCH Test Bulk Upload - Copy - Copy - Copy",
      "ServiceConfirmationStatus": "Approved",
      "CreatedBy": "123@gep.com",
      "TotalAmount": 0,
      "ClientPartnerCode": "0050007745",
      "WorkLocation": "dfsd",
      "HeaderComments": [
         {
            "CommentText": "Header level comments %1%"
         }
      ],
      "HeaderEntity": [
         {
            "EntityCode": "PC2",
            "IsDefault": false
         },
         {
            "EntityCode": "ElSegundo",
            "IsDefault": false
         },
         {
            "EntityCode": "ElSegundo-0061",
            "IsDefault": false
         },
         {
            "EntityCode": "0061",
            "IsDefault": false
         },
         {
            "EntityCode": "DRES",
            "IsDefault": false
         },
         {
            "EntityCode": "DPDS",
            "IsDefault": false
         },
         {
            "EntityCode": "3A2",
            "IsDefault": false
         }
      ],
      "ServiceConfirmationDate": "2020-05-14T16:40:40.107",
      "FieldSupervisorID": "CC-2020.005019",
      "originatingSourceSystem": "Maximo",
      "IsERS": true,
      "Tax": 2
   },
   "ServiceConfirmationOrder": {
      "OrderID": "0060204151-001",
      "ServiceConfirmationItem": [
         {
            "ServiceConfirmationLineNumber": 1,
            "Description": "Test Smart Flow 30121",
            "Quantity": 1,
            "UnitOfMeasure": "EA",
            "UnitPrice": 10,
            "POLineNumber": 1,
            "ItemType": "Material",
            "ItemExtendedType": "Material",
            "CategoryName": "53A",
            "ServiceStartDate": "2020-05-05T16:00:00",
            "ServiceEndDate": "2020-05-05T16:00:00",
            "ConsumedDate": "2020-05-05T16:00:00",
            "SupplierPartID": "1",
            "SubLine": 1,
            "ScParentLine": 1,
            "ServiceLocation": {
               "LocationName": "Chevron Products Co.",
               "Address": {
                  "Addressline1": "13215 N. Promenade Blvd.",
                  "City": "Stafford",
                  "ZipCode": "77477",
                  "StateInfo": {
                     "StateAbbrevationCode": "TX"
                  },
                  "CountryInfo": {
                     "CountryCode": "US",
                     "CountryName": "United States"
                  }
               },
               "RegistrationDetails": []
            },
            "ItemSplit": [
               {
                  "ItemSplitEntities": [],
                  "Charge": 6,
                  "SplitType": "Percentage",
                  "Quantity": 0.5,
                  "Percentage": 50
               },
               {
                  "ItemSplitEntities": [],
                  "Charge": 3,
                  "SplitType": "Percentage",
                  "Quantity": 0.25,
                  "Percentage": 25
               },
               {
                  "ItemSplitEntities": [],
                  "Charge": 3,
                  "SplitType": "Percentage",
                  "Quantity": 0.25,
                  "Percentage": 25
               }
            ],
            "LineComment": [
               {
                  "CommentText": "Line level comments %1%"
               }
            ],
            "Tax": 2,
            "supplierPersonalName": "abc"

         }
      ]
   }
}

Error Scenario - Response 

{
   "data": null,
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "SC_28_05_20_4",
         "errors": [
            {
               "errorCode": "DataException",
               "errorDescription": "Duplicate service confirmation number :SC_28_05_20_4"
            },
            {
               "errorCode": "DataException",
               "errorDescription": "Duplicate ERP SC Number is not allowed."
            },
            {
               "errorCode": "DataException",
               "errorDescription": "There was an error in processing the service confirmation as EndDate Can not be greater than PO EndDate"
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements

Model

Property

Required?

Data type

Description

Validations/Exceptions

ServiceConfirmationRequestHeader

Yes

ServiceConfirmationRequestHeader object

Check data type ServiceConfirmationRequestHeader for details

 

ServiceConfirmationOrder

Yes

ServiceConfirmationOrder object

Check ServiceConfirmationOrder for details

 

ServiceConfirmationRequestHeader

Property

Required?

Data type

Description

Validations/Exceptions

IsERS

No

Boolean

 

 

WorkLocation

No

String

 

 

ServiceEndDate

Yes

DateTime

ServiceConfirmation completion date

  • End date is mandatory

  • End date for (documentNumber) cannot be less than Start date

ServiceStartDate

Yes

DateTime

ServiceConfirmation Start date

  • Start date is mandatory

FieldSupervisorID

Yes

String

 

  • Field supervisor is mandatory

  • FieldSupervisor is not mapped to LOB: (CustomerContact)

  • FieldSupervisor is not mapped to BU: (CustomerContact)

  • Invalid supervisor ID: (CustomerContact)

SubmittedOn

No

DateTime

 

 

SubmittedBy

No

String

 

 

ServiceConfirmationDate

Yes

DateTime

Serviceconfirmation Creation Date

  • Service Confirmation Date is mandatory

  • Service Confirmation Date cannot be greater that current date

OrderName

No

String

Order Name for which SC is created

 

OrderNumber

Yes

String

Order Number for which SC is created

  • Order Number is mandatory

  • Cannot create service confirmation for order: (OrderNumber) as order is not in valid status

  • Invalid order number: (OrderNumber)

  • Cannot create service confirmation for order as order is not in valid status

Description

No

String

 

 

HeaderEntity

No

List of OrgEntity object

Check OrgEntity for details

 

SourceSystem

No

String

SourceSystemName

 

OriginatingSourceSystem

No

String

OriginatingSourceSystemName

 

Tax

No

Decimal

 

 

CreatedBy

No

String

 

 

ServiceConfirmationStatus

No

String

Status of ServiceConfirmation

  • Service confirmation document cannot be cancelled as its invoice is not in Cancelled, Internally Cancelled or Draft status

LOB

No

String

Line of Business

 

serviceConfirmationApprover

 

String

Service Confirmation Approver

 

ServiceConfirmationName

No

String

 

 

partnerServiceConfirmationNumber

Yes

String

 

  • Supplier is mandatory

  • Invalid ClientLocationCode :' + (SupplierCode)

clientPartnerCode

No

String

 

 

HeaderComments

No

List of InterfaceComment object

Check InterfaceComment for details

 

Operation

Yes

String

Operation of ServiceConfirmation i.e. new/update/Delete

  • Operation is mandatory

  • Operation (  ) is Invalid

ServiceConfirmationNumber

Yes

String

ServiceConfirmation Number

  • ServiceConfirmation Number is mandatory

  • Service confirmation number length cannot be greater than (Setting based- MaximumNumberOfCharactersForSupplierInvoiceNumber)

  • Invalid ServiceConfirmation Number

Currency

Yes

String

Currency

  • Currency is mandatory for Split total of Item No: ()

  • Service confirmation cannot have different currency then that of order

TotalAmount

Yes

String

 

  • Total Amount cannot be negative

HeaderEntity

Property

Required?

Data type

Description

Validations/Exceptions

EntityCode

No

String

 

 

IsDefault

No

Boolean

 

 

EntityType

No

String

 

 

LOBEntityCode

No

String

 

 

HeaderComments

Property

Required?

Data type

Description

Validations/Exceptions

CommentText

No

String     

 

 

AccessType

No

String

 

 

CommentAttachment

No

List of InterfaceCommentAttachment object

Check InterfaceCommentAttachment for details

 

CommentAttachment

Property

Required?

Data type

Description

Validations/Exceptions

FileName

No

String

 

 

FileUri

No

String

 

 

attachmentData

 

 string

Data in attachment

 

Extension

 

string

Extension

 

contentTransferEncoding

 

string

Content Transfer Encoding

 

ServiceConfirmationOrder

Property

Required?

Data type

Description

Validations/Exceptions

OrderID

Yes

String

OrderId sor which SC is created

  • Order Number is mandatory

  • Cannot create service confirmation for order (OrderNumber) as order is not in valid status

  • Invalid order number:' + (OrderNumber)

ServiceConfirmationItem

Yes

List of ServiceConfirmationItem object

Check ServiceConfirmationItem for details

 

ServiceConfirmationItem

Property

Required?

Data type

Description

Validations/Exceptions

LineComment

No

List of InterfaceComment object

Check InterfaceComment for details

 

ItemSplit

No

List of Accounting object

Check Accounting for details

 

ScParentLine

Yes, if EnableGenericFlowForServiceConfirmation is true

Int

 

  • These validations exist only if setting (EnableGenericFlowForServiceConfirmation) is true:

  • ServiceConfirmation SCParentline Number is mandatory

  • ServiceConfirmation SCParentline Number length is greater than 9 digits for Item No: ()

Lines without subline cannot have duplicate scParentline number

SubLine

Yes, if EnableGenericFlowForServiceConfirmation is true

Int

 

  • These Validations exist only if setting (EnableGenericFlowForServiceConfirmation) is true:

  • ServiceConfirmation Subline Number is mandatory

  • ServiceConfirmation Subline Number length is greater than 9 digits for Item No: ()

SupplierPartID

No

String

 

 

LineNumber

Yes

Int

Order Line number

  • ServiceConfirmation Line Number is mandatory

  • ServiceConfirmation Line Number for Item No: () is not a unique

  • ServiceConfirmation Line Number length is greater than 9 digits for Item No: ()

  • There was an error in processing the service confirmation as the item(s) have invalid order line reference: ()

  • Cannot create service confirmation for order (Ordernumber) as order line (orderlinenumber) is not in valid status or closed for receiving

  • There was an error in processing the service confirmation as the item(s) () were closed for receiving in the order

  • There was an error in processing the service confirmation as Parent line ConsumedDate should be in Range of Order Date Requested and Date Needed for Line Reference:()

ManufacturerName

No

String

 

 

ManufacturerPartID

No

String

 

 

ConsumedDate

Yes

DateTime

 

  • These validations exist only if setting (EnableGenericFlowForServiceConfirmation) is true:

  • Consumed date is not supported for Service line Item(s): ()

  • Consumed date is mandatory for Material line Item(s): ()

  • Consumed date Cannot be greater  than current date for Material line Item(s): ()

  • There was an error in processing the service confirmation as ConsumedDate Should be in Range of Order Startdate and Enddate for Line Reference: ()

CategoryName

Yes

String

 

  • Category is mandatory for line Number: ()

ServiceEndDate

Yes

DateTime

Service confirmation End date

  • These Validations exist only if setting (EnableGenericFlowForServiceConfirmation) is true:

  • End date for Item No: () cannot be less than Start date

  • Start date Or EndDate is mandatory for Service line Item(s): ()

  • End date Cannot be greater than current date for Service line Item(s): ()

  • Startdate or Enddate are not supported for Material line Item(s): ()

  • There was an error in processing the service confirmation as EndDate cannot be greater than PO EndDate for Line Number: ()

ServiceStartDate

Yes

DateTime

Service confirmation Start date

  • These Validations exist only if setting (EnableGenericFlowForServiceConfirmation) is true:

  • Start date Or EndDate is mandatory for Service line Item(s): ()

  • Start date Cannot be greater than current date for Service line Item(s): ()

  • Startdate or Enddate are not supported for Material line Item(s): ()

  • There was an error in processing the service confirmation as StartDate cannot be less than PO StartDate for Line Number: ()

UnitPrice

Yes

Decimal

Unit Price for the Line Item

  • Unit price cannot be 0 for Item No: ()

  • Unit price cannot be negative for Item No: ()

UnitOfMeasure

Yes

String

Unit of Measure for the Line item

  • UOM is mandatory for Item No

  • There was an error in processing the service confirmation as the UOM of item(s) () is Invalid

ServiceLocation

No

InterfaceShiptoLocation

Check InterfaceShiptoLocation for details

 

ContractNumber

No

String

 

 

ItemExtendedType

Yes, if EnableGenericFlowForServiceConfirmation is true

String

 

  • ItemExtendedType For Item No: () cannot be other than Fixed or Variable

  • ItemExtendedType For Item No: () is not valid for Service Line Item

  • There was an error in processing the service confirmation as the parent line item(s) have invalid Item Type or Item Extended Type mapped to given order line reference: ()

Below validation is only if setting (EnableGenericFlowForServiceConfirmation=true)

  • ItemExtendedType For Item No: () is mandatory

ItemType

Yes

String

 

  • ItemType For Item No: () is not a valid Item Type

  • Below validation is only if setting (EnableGenericFlowForServiceConfirmation=true)

  • ItemType For Item No: " + (i + 1) + " is mandatory

Quantity

Yes

Decimal

 

  • Quantity is mandatory for Item No: ()

Description

No

String

 

 

ServiceConfirmationLineNumber

Yes

int

 

  • ServiceConfirmation Line Number is mandatory

  • ServiceConfirmation Line Number for Item No: () is not a unique

  • ServiceConfirmation Line Number length is greater than 9 digits for Item No: ()

  • Invalid Items: Duplicate Line Item Number ()

AgreementID

No

String

 

 

PoLineNumber

No

Int

 

 

Tax

No

Decimal

 

 

supplierPersonalName

No

String

Check supplierPersonalName

Validate supplierPersonalName field length upto 400 character

ItemSplit

Property

Required?

Data type

Description

Validations/Exceptions

ItemSplitEntities

No

List of AccountingSegment object

Check Accounting Segment for details

  • It has duplicate Accounting entity for Item No:" ()

Charge

No

Decimal

 

  • Split total for Item No: () cannot be negative

SplitType

No

String

 

 

Name

No

String

 

 

Quantity

No

Decimal

 

 

Percentage

No

Decimal

 

 

ItemSplitEntities

Property

Required?

Data type

Description

Validations/Exceptions

Id

No

String

 

  • There was an error in processing the service confirmation as the item(s) does not have Accounting entity code

Name

No

String

 

  • There was an error in processing the service confirmation as the item(s) has invalid Accounting entity type

Description

No

string

 

 

ServiceLocation

Property

Required?

Data type

Description

Validations/Exceptions

ShiptoLocationName

No

String

 

 

ShiptoLocationNumber

No

String

 

 

Address

No

InterfaceAddress object

 

 

TelephoneNumber

No

Int

 

 

RegistrationDetails

No

List of PartnerWiseIdentificationDetail object

 

 

Address

Property

Required?

Data type

Description

Validations/Exceptions

IsdCode

No

String

 

 

PoBoxNumber

No

String

 

 

County

No

String

 

 

FaxNo

No

String

 

 

MobileNo

No

String

 

 

ExtenstionNo2

No

String

 

 

PhoneNo2

No

String

 

 

GeoCode

No

String

 

 

ExtenstionNo1

No

String

 

 

CountryInfo

No

InterfaceCountryInfo object

 

 

StateInfo

No

InterfaceStateInfo object

 

 

ZipCode

No

String

 

 

City

No

String

 

 

Addressline3

No

String

 

 

Addressline2

No

String

 

 

Addressline1

No

String

 

 

PhoneNo1

No

String

 

 

AreaCode

No

String

 

 

CountryInfo

Property

Required?

Data type

Description

Validations/Exceptions

CountryCode

No

String

 

 

CountryName

No

String

 

 

StateInfo

Property

Required?

Data type

Description

Validations/Exceptions

StateAbbrevationCode

No

String

 

 

StateName

No

String

 

 

RegistrationDetails

Property

Required?

Data type

Description

Validations/Exceptions

CompanyIdentificationDisplayName

No

String

 

 

CompanyIdentification

No

String