function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Daniel BleasdaleDaniel Bleasdale 

External Services Error | While trying to use the "External Sevices" I get the error “Error encountered while saving External Registration. Please try again later.”

I'm currently in a Developer Sandbox trying to get the "External Services" to work. I have gone through the TrailHead and had it working with the resources I was supplied but once I try to use the actual API schema we need I get the error “Error encountered while saving External Registration. Please try again later.” which doesn't give me much to go off. I have tried raising the case with Salesforce and asking this question on other sites to no avail. https://salesforce.stackexchange.com/questions/309320/while-trying-to-use-the-external-sevices-i-get-the-error-error-encountered-whil?noredirect=1#comment463197_309320 (https://salesforce.stackexchange.com/questions/309320/while-trying-to-use-the-external-sevices-i-get-the-error-error-encountered-whil?noredirect=1#comment463197_309320)

Just to confirm I have created a "Named Credential" and added the corresponding domain to the "Remote Site Settings".

The Steps to reproduce the error are:

1) From Setup, enter Remote Site Settings in the Quick Find box, then select Remote Site Settings.
Click New Remote Site.
Remote Site Name, use FindAnApprenticeshipAPIURL.
Remote Site URL https://apis.apprenticeships.sfa.bis.gov.uk.

2) From Setup, enter Named Credentials in the Quick Find box, then select Named Credentials.
Click New Named Credential.
Label, use FindAnApprenticeshipNamedCred.
URL, use https://apis.apprenticeships.sfa.bis.gov.uk/manage-vacancies-sandbox/v1/apprenticeships.

3) From Setup, enter External Services in the Quick Find box, then select External Services.
Click Add an External Service.
External Service Name, use FindAnApprenticeshipExService.
Select a Named Credential, select FindAnApprenticeshipNamedCred.
Select Service Schema Complete JSON. Then paste the schema information from "https://developers.apprenticeships.education.gov.uk/docs/services/eebd1522767f4f1fbdfe51bd7010aa7e/export?DocumentFormat=Swagger":
{
"swagger": "2.0",
"info": {
"title": "Manage vacancies API (Sandbox)",
"version": "1.0",
"description": "Manage vacancies API (Sandbox)"
},
"host": "apis.apprenticeships.sfa.bis.gov.uk",
"basePath": "/manage-vacancies-sandbox",
"schemes": [
"https"
],
"securityDefinitions": {
"apiKeyHeader": {
"type": "apiKey",
"name": "Ocp-Apim-Subscription-Key",
"in": "header"
},
"apiKeyQuery": {
"type": "apiKey",
"name": "subscription-key",
"in": "query"
}
},
"security": [
{
"apiKeyHeader": []
},
{
"apiKeyQuery": []
}
],
"x-servers": [
{
"url": "https://apis.apprenticeships.sfa.bis.gov.uk"
},
{
"url": "https://apis.apprenticeships.education.gov.uk"
}
],
"paths": {
"/v1/apprenticeships": {
"post": {
"description": "The apprenticeship operation creates an apprenticeship vacancy using the specified values.\r\n\r\n#### Restricted values ####\r\n\r\nThese fields will only accept specific values as listed below:\r\n* ApplicationMethod\r\n - Online\r\n - Offline\r\n* LocationType\r\n - OtherLocation\r\n - EmployerLocation\r\n - Nationwide\r\n* DurationType\r\n - Weeks\r\n - Months\r\n - Years\r\n* WageType\r\n - CustomWageFixed\r\n - CustomWageRange\r\n - NationalMinimumWage\r\n - ApprenticeshipMinimumWage\r\n - Unwaged\r\n - CompetitiveSalary\r\n - ToBeSpecified\r\n* WageUnit\r\n - NotApplicable\r\n - Weekly\r\n - Monthly\r\n - Annually\r\n* TrainingType\r\n - Framework\r\n - Standard\r\n\r\n#### Validation rules ####\r\n\r\nWhen creating a vacancy the following rules must be considered. \r\n1. All values are required to be populated except in the following cases:\r\n\r\n* For all vacancies these values are optional\r\n - ContactName\r\n - ContactEmail\r\n - ContactNumber\r\n - ThingsToConsider\r\n\r\n* For an Online vacancy\r\n - SupplementaryQuestion1 and SupplementaryQuestion2 are optional\r\n - ExternalApplicationUrl and ExternalApplicationInstructions must be empty\r\n\r\n* For an Offline vacancy\r\n - ExternalApplicationInstructions is optional\r\n - SupplementaryQuestion1 and SupplementaryQuestion2 must be empty\r\n\r\n* When LocationType is EmployerLocation or Nationwide \r\n - Location is not required.\r\n\r\n* When LocationType is OtherLocation \r\n - Only Address1, Town and Postcode are required\r\n - All other address fields are optional\r\n\r\n* When WageType is CustomWageFixed\r\n - WageTypeReason must be empty\r\n - WageUnit must be a value other than NotApplicable\r\n - MinWage and MaxWage must be empty\r\n - FixedWage must be greater than or equal to the Apprenticeship minimum wage \r\n\r\n* When WageType is CustomWageRange\r\n - WageTypeReason must be empty\r\n - WageUnit must be a value other than NotApplicable\r\n - MinWage must be greater than or equal to the Apprenticeship minimum wage \r\n - MaxWage must be greater than MinWage\r\n - FixedWage must be empty\r\n\r\n* When WageType is NationalMinimumWage or ApprenticeshipMinimumWage\r\n - MinWage, MaxWage, FixedWage and WageTypeReason must be empty\r\n - WageUnit must be NotApplicable\r\n\r\n* When WageType is Unwaged, CompetitiveSalary or ToBeSpecified\r\n - FixedWage, MinWage and MaxWage must be empty\r\n - WageUnit must be NotApplicable\r\n\r\n* When TrainingType is Framework\r\n - TrainingCode should be in format ###-##-##\r\n\r\n* When TrainingType is Standard\r\n - TrainingCode should be a numeric value no greater than 9999\r\n\r\n* Text fields will take a maximum of 4,000 characters except for the following\r\n - Title = 100\r\n - ShortDescription = 350\r\n - ContactName = 100\r\n - ContactEmail = 100\r\n - AddressLine = 300\r\n - Town = 100\r\n - WageTypeReason = 240\r\n - WorkingWeek = 250\r\n\r\n* Additional rules\r\n - Title must include the word ***apprentice***\r\n - HoursPerWeek must be between 16 and 48 inclusive\r\n - ExpectedDuration must be a minimum of 1 year, 12 months or 52 weeks depending on the value of DurationType selected\r\n - NumberOfPositions must not exceed 5,000\r\n\r\n#### Error codes ####\r\n\r\nThe following error codes may be returned when calling this operation if any of the vacancy values \r\nspecified fail validation:\r\n\r\n| Error code | Explanation |\r\n| ----------- | ------------------------------------------- |\r\n| 31000 | Invalid Request body |\r\n| 31001 | Invalid Title |\r\n| 31002 | Invalid Short description |\r\n| 31003 | Invalid Long description |\r\n| 31004 | Invalid Application closing date |\r\n| 31005 | Invalid Expected start date |\r\n| 31006 | Invalid Working week |\r\n| 31007 | Invalid Hours per week |\r\n| 31008 | Invalid Wage type |\r\n| 31009 | Invalid Wage type reason |\r\n| 31010 | Invalid Wage unit |\r\n| 31011 | Invalid Fixed wage |\r\n| 31012 | Invalid Min wage |\r\n| 31013 | Invalid Max wage |\r\n| 31014 | Invalid Expected duration |\r\n| 31015 | Invalid Duration type |\r\n| 31016 | Invalid Location type |\r\n| 31017 | Invalid Location Address line 1 |\r\n| 31018 | Invalid Location Address line 2 |\r\n| 31019 | Invalid Location Address line 3 |\r\n| 31020 | Invalid Location Address line 4 |\r\n| 31021 | Invalid Location Address line 5 |\r\n| 31022 | Invalid Location Town |\r\n| 31023 | Invalid Location Postcode |\r\n| 31024 | Invalid Number of positions |\r\n| 31025 | Invalid Provider's Ukprn |\r\n| 31026 | Invalid Employer's Edsurn |\r\n| 31027 | Invalid Provider site's Edsurn |\r\n| 31028 | Invalid Contact Name |\r\n| 31029 | Invalid Contact Email |\r\n| 31030 | Invalid Contact Number |\r\n| 31031 | Invalid Training Type |\r\n| 31032 | Invalid Training Code |\r\n| 31033 | Invalid Desired skills |\r\n| 31034 | Invalid Desired personal qualities |\r\n| 31035 | Invalid Desired qualifications |\r\n| 31036 | Invalid Future prospects |\r\n| 31037 | Invalid Things to consider |\r\n| 31038 | Invalid Training to be provided |\r\n| 31039 | Invalid Application method |\r\n| 31040 | Invalid Supplementary question 1 |\r\n| 31041 | Invalid Supplementary question 2 |\r\n| 31042 | Invalid External application url |\r\n| 31043 | Invalid External Application Instructions |\r\n| 31044 | Invalid Is Employer Disability Confident |\r\n| 31045 | Invalid Location Additional Information |\r\n| 31046 | Invalid Employer Description |\r\n| 31047 | Invalid Employer Website Url |",
"operationId": "CreateApprenticeshipVacancy",
"summary": "CreateApprenticeshipVacancy",
"tags": [
"Apprenticeships"
],
"parameters": [
{
"name": "createApprenticeshipParameters",
"in": "body",
"schema": {
"$ref": "#/definitions/CreateApprenticeshipParameters"
}
}
],
"consumes": [
"application/json",
"text/json",
"application/xml",
"text/xml",
"application/x-www-form-urlencoded"
],
"produces": [
"application/json",
"text/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/CreateApprenticeshipResponse"
}
},
"400": {
"description": "Failed request validation",
"schema": {
"$ref": "#/definitions/BadRequestContent"
}
},
"401": {
"description": "Invalid provider ukprn",
"schema": {
"$ref": "#/definitions/StringContent"
}
}
}
}
}
},
"definitions": {
"CreateApprenticeshipParameters": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"shortDescription": {
"type": "string"
},
"longDescription": {
"type": "string"
},
"desiredSkills": {
"type": "string"
},
"desiredPersonalQualities": {
"type": "string"
},
"desiredQualifications": {
"type": "string"
},
"futureProspects": {
"type": "string"
},
"thingsToConsider": {
"type": "string"
},
"trainingToBeProvided": {
"type": "string"
},
"applicationMethod": {
"enum": [
"Online",
"Offline"
],
"type": "string"
},
"supplementaryQuestion1": {
"type": "string"
},
"supplementaryQuestion2": {
"type": "string"
},
"externalApplicationUrl": {
"type": "string"
},
"externalApplicationInstructions": {
"type": "string"
},
"expectedDuration": {
"format": "int32",
"type": "integer"
},
"durationType": {
"enum": [
"Weeks",
"Months",
"Years"
],
"type": "string"
},
"applicationClosingDate": {
"format": "date-time",
"type": "string"
},
"expectedStartDate": {
"format": "date-time",
"type": "string"
},
"workingWeek": {
"type": "string"
},
"hoursPerWeek": {
"format": "double",
"type": "number"
},
"wageType": {
"enum": [
"CustomWageFixed",
"CustomWageRange",
"NationalMinimumWage",
"ApprenticeshipMinimumWage",
"Unwaged",
"CompetitiveSalary",
"ToBeSpecified"
],
"type": "string"
},
"wageTypeReason": {
"type": "string"
},
"wageUnit": {
"enum": [
"NotApplicable",
"Weekly",
"Monthly",
"Annually"
],
"type": "string"
},
"minWage": {
"format": "double",
"type": "number"
},
"maxWage": {
"format": "double",
"type": "number"
},
"fixedWage": {
"format": "double",
"type": "number"
},
"locationType": {
"enum": [
"OtherLocation",
"EmployerLocation",
"Nationwide"
],
"type": "string"
},
"location": {
"$ref": "#/definitions/Location"
},
"numberOfPositions": {
"format": "int32",
"type": "integer"
},
"employerEdsUrn": {
"format": "int32",
"type": "integer"
},
"providerSiteEdsUrn": {
"format": "int32",
"type": "integer"
},
"contactName": {
"type": "string"
},
"contactEmail": {
"type": "string"
},
"contactNumber": {
"type": "string"
},
"trainingType": {
"enum": [
"Framework",
"Standard"
],
"type": "string"
},
"trainingCode": {
"type": "string"
},
"isEmployerDisabilityConfident": {
"type": "boolean"
},
"employerWebsiteUrl": {
"type": "string"
},
"employerDescription": {
"type": "string"
}
}
},
"Location": {
"type": "object",
"properties": {
"addressLine1": {
"type": "string"
},
"addressLine2": {
"type": "string"
},
"addressLine3": {
"type": "string"
},
"addressLine4": {
"type": "string"
},
"addressLine5": {
"type": "string"
},
"postcode": {
"type": "string"
},
"town": {
"type": "string"
},
"additionalInformation": {
"type": "string"
}
}
},
"CreateApprenticeshipResponse": {
"type": "object",
"properties": {
"vacancyReferenceNumber": {
"format": "int32",
"type": "integer"
}
}
},
"BadRequestContent": {
"type": "object",
"properties": {
"requestErrors": {
"type": "array",
"items": {
"$ref": "#/definitions/BadRequestError"
}
}
}
},
"BadRequestError": {
"type": "object",
"properties": {
"errorCode": {
"type": "string"
},
"errorMessage": {
"type": "string"
}
}
},
"StringContent": {
"type": "object",
"properties": {
"headers": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValuePair[String,IEnumerable[String]]"
},
"readOnly": true
}
}
},
"KeyValuePair[String,IEnumerable[String]]": {
"type": "object",
"properties": {
"key": {
"type": "string",
"readOnly": true
},
"value": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true
}
}
}
},
"tags": []
}
4) Press Save.

Then get the error "Error encountered while saving External Registration. Please try again later."
The Error I Get
Any help will be much-appreciated thankyou.
Best Answer chosen by Daniel Bleasdale
SwethaSwetha (Salesforce Developers) 
Adding to the above, it appears to be an issue with the description.I removed the description and could go to the next step.

User-added image
Edited:
{
  "swagger": "2.0",
  "info": {
    "title": "Manage vacancies API (Sandbox)",
    "version": "1.0",
    "description": "Manage vacancies API (Sandbox)"
  },
  "host": "apis.apprenticeships.sfa.bis.gov.uk",
  "basePath": "/manage-vacancies-sandbox",
  "schemes": [
    "https"
  ],
  "securityDefinitions": {
    "apiKeyHeader": {
      "type": "apiKey",
      "name": "Ocp-Apim-Subscription-Key",
      "in": "header"
    },
    "apiKeyQuery": {
      "type": "apiKey",
      "name": "subscription-key",
      "in": "query"
    }
  },
  "security": [
    {
      "apiKeyHeader": []
    },
    {
      "apiKeyQuery": []
    }
  ],
  "x-servers": [
    {
      "url": "https://apis.apprenticeships.sfa.bis.gov.uk"
    },
    {
      "url": "https://apis.apprenticeships.education.gov.uk"
    }
  ],
  "paths": {
    "/v1/apprenticeships": {
      "post": {
        "description": "",
        "operationId": "CreateApprenticeshipVacancy",
        "summary": "CreateApprenticeshipVacancy",
        "tags": [
          "Apprenticeships"
        ],
        "parameters": [
          {
            "name": "createApprenticeshipParameters",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CreateApprenticeshipParameters"
            }
          }
        ],
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CreateApprenticeshipResponse"
            }
          },
          "400": {
            "description": "Failed request validation",
            "schema": {
              "$ref": "#/definitions/BadRequestContent"
            }
          },
          "401": {
            "description": "Invalid provider ukprn",
            "schema": {
              "$ref": "#/definitions/StringContent"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "CreateApprenticeshipParameters": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "shortDescription": {
          "type": "string"
        },
        "longDescription": {
          "type": "string"
        },
        "desiredSkills": {
          "type": "string"
        },
        "desiredPersonalQualities": {
          "type": "string"
        },
        "desiredQualifications": {
          "type": "string"
        },
        "futureProspects": {
          "type": "string"
        },
        "thingsToConsider": {
          "type": "string"
        },
        "trainingToBeProvided": {
          "type": "string"
        },
        "applicationMethod": {
          "enum": [
            "Online",
            "Offline"
          ],
          "type": "string"
        },
        "supplementaryQuestion1": {
          "type": "string"
        },
        "supplementaryQuestion2": {
          "type": "string"
        },
        "externalApplicationUrl": {
          "type": "string"
        },
        "externalApplicationInstructions": {
          "type": "string"
        },
        "expectedDuration": {
          "format": "int32",
          "type": "integer"
        },
        "durationType": {
          "enum": [
            "Weeks",
            "Months",
            "Years"
          ],
          "type": "string"
        },
        "applicationClosingDate": {
          "format": "date-time",
          "type": "string"
        },
        "expectedStartDate": {
          "format": "date-time",
          "type": "string"
        },
        "workingWeek": {
          "type": "string"
        },
        "hoursPerWeek": {
          "format": "double",
          "type": "number"
        },
        "wageType": {
          "enum": [
            "CustomWageFixed",
            "CustomWageRange",
            "NationalMinimumWage",
            "ApprenticeshipMinimumWage",
            "Unwaged",
            "CompetitiveSalary",
            "ToBeSpecified"
          ],
          "type": "string"
        },
        "wageTypeReason": {
          "type": "string"
        },
        "wageUnit": {
          "enum": [
            "NotApplicable",
            "Weekly",
            "Monthly",
            "Annually"
          ],
          "type": "string"
        },
        "minWage": {
          "format": "double",
          "type": "number"
        },
        "maxWage": {
          "format": "double",
          "type": "number"
        },
        "fixedWage": {
          "format": "double",
          "type": "number"
        },
        "locationType": {
          "enum": [
            "OtherLocation",
            "EmployerLocation",
            "Nationwide"
          ],
          "type": "string"
        },
        "location": {
          "$ref": "#/definitions/Location"
        },
        "numberOfPositions": {
          "format": "int32",
          "type": "integer"
        },
        "employerEdsUrn": {
          "format": "int32",
          "type": "integer"
        },
        "providerSiteEdsUrn": {
          "format": "int32",
          "type": "integer"
        },
        "contactName": {
          "type": "string"
        },
        "contactEmail": {
          "type": "string"
        },
        "contactNumber": {
          "type": "string"
        },
        "trainingType": {
          "enum": [
            "Framework",
            "Standard"
          ],
          "type": "string"
        },
        "trainingCode": {
          "type": "string"
        },
        "isEmployerDisabilityConfident": {
          "type": "boolean"
        },
        "employerWebsiteUrl": {
          "type": "string"
        },
        "employerDescription": {
          "type": "string"
        }
      }
    },
    "Location": {
      "type": "object",
      "properties": {
        "addressLine1": {
          "type": "string"
        },
        "addressLine2": {
          "type": "string"
        },
        "addressLine3": {
          "type": "string"
        },
        "addressLine4": {
          "type": "string"
        },
        "addressLine5": {
          "type": "string"
        },
        "postcode": {
          "type": "string"
        },
        "town": {
          "type": "string"
        },
        "additionalInformation": {
          "type": "string"
        }
      }
    },
    "CreateApprenticeshipResponse": {
      "type": "object",
      "properties": {
        "vacancyReferenceNumber": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "BadRequestContent": {
      "type": "object",
      "properties": {
        "requestErrors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/BadRequestError"
          }
        }
      }
    },
    "BadRequestError": {
      "type": "object",
      "properties": {
        "errorCode": {
          "type": "string"
        },
        "errorMessage": {
          "type": "string"
        }
      }
    },
    "StringContent": {
      "type": "object",
      "properties": {
        "headers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/KeyValuePair[String,IEnumerable[String]]"
          },
          "readOnly": true
        }
      }
    },
    "KeyValuePair[String,IEnumerable[String]]": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "readOnly": true
        },
        "value": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "readOnly": true
        }
      }
    }
  },
  "tags": []
}

 

All Answers

SwethaSwetha (Salesforce Developers) 
HI Daniel,

I was able to reproduce the error message you said.Do you have any Schema URL that you can use with "Service Schema Relative URL" option? Thanks
SwethaSwetha (Salesforce Developers) 
Adding to the above, it appears to be an issue with the description.I removed the description and could go to the next step.

User-added image
Edited:
{
  "swagger": "2.0",
  "info": {
    "title": "Manage vacancies API (Sandbox)",
    "version": "1.0",
    "description": "Manage vacancies API (Sandbox)"
  },
  "host": "apis.apprenticeships.sfa.bis.gov.uk",
  "basePath": "/manage-vacancies-sandbox",
  "schemes": [
    "https"
  ],
  "securityDefinitions": {
    "apiKeyHeader": {
      "type": "apiKey",
      "name": "Ocp-Apim-Subscription-Key",
      "in": "header"
    },
    "apiKeyQuery": {
      "type": "apiKey",
      "name": "subscription-key",
      "in": "query"
    }
  },
  "security": [
    {
      "apiKeyHeader": []
    },
    {
      "apiKeyQuery": []
    }
  ],
  "x-servers": [
    {
      "url": "https://apis.apprenticeships.sfa.bis.gov.uk"
    },
    {
      "url": "https://apis.apprenticeships.education.gov.uk"
    }
  ],
  "paths": {
    "/v1/apprenticeships": {
      "post": {
        "description": "",
        "operationId": "CreateApprenticeshipVacancy",
        "summary": "CreateApprenticeshipVacancy",
        "tags": [
          "Apprenticeships"
        ],
        "parameters": [
          {
            "name": "createApprenticeshipParameters",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CreateApprenticeshipParameters"
            }
          }
        ],
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CreateApprenticeshipResponse"
            }
          },
          "400": {
            "description": "Failed request validation",
            "schema": {
              "$ref": "#/definitions/BadRequestContent"
            }
          },
          "401": {
            "description": "Invalid provider ukprn",
            "schema": {
              "$ref": "#/definitions/StringContent"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "CreateApprenticeshipParameters": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "shortDescription": {
          "type": "string"
        },
        "longDescription": {
          "type": "string"
        },
        "desiredSkills": {
          "type": "string"
        },
        "desiredPersonalQualities": {
          "type": "string"
        },
        "desiredQualifications": {
          "type": "string"
        },
        "futureProspects": {
          "type": "string"
        },
        "thingsToConsider": {
          "type": "string"
        },
        "trainingToBeProvided": {
          "type": "string"
        },
        "applicationMethod": {
          "enum": [
            "Online",
            "Offline"
          ],
          "type": "string"
        },
        "supplementaryQuestion1": {
          "type": "string"
        },
        "supplementaryQuestion2": {
          "type": "string"
        },
        "externalApplicationUrl": {
          "type": "string"
        },
        "externalApplicationInstructions": {
          "type": "string"
        },
        "expectedDuration": {
          "format": "int32",
          "type": "integer"
        },
        "durationType": {
          "enum": [
            "Weeks",
            "Months",
            "Years"
          ],
          "type": "string"
        },
        "applicationClosingDate": {
          "format": "date-time",
          "type": "string"
        },
        "expectedStartDate": {
          "format": "date-time",
          "type": "string"
        },
        "workingWeek": {
          "type": "string"
        },
        "hoursPerWeek": {
          "format": "double",
          "type": "number"
        },
        "wageType": {
          "enum": [
            "CustomWageFixed",
            "CustomWageRange",
            "NationalMinimumWage",
            "ApprenticeshipMinimumWage",
            "Unwaged",
            "CompetitiveSalary",
            "ToBeSpecified"
          ],
          "type": "string"
        },
        "wageTypeReason": {
          "type": "string"
        },
        "wageUnit": {
          "enum": [
            "NotApplicable",
            "Weekly",
            "Monthly",
            "Annually"
          ],
          "type": "string"
        },
        "minWage": {
          "format": "double",
          "type": "number"
        },
        "maxWage": {
          "format": "double",
          "type": "number"
        },
        "fixedWage": {
          "format": "double",
          "type": "number"
        },
        "locationType": {
          "enum": [
            "OtherLocation",
            "EmployerLocation",
            "Nationwide"
          ],
          "type": "string"
        },
        "location": {
          "$ref": "#/definitions/Location"
        },
        "numberOfPositions": {
          "format": "int32",
          "type": "integer"
        },
        "employerEdsUrn": {
          "format": "int32",
          "type": "integer"
        },
        "providerSiteEdsUrn": {
          "format": "int32",
          "type": "integer"
        },
        "contactName": {
          "type": "string"
        },
        "contactEmail": {
          "type": "string"
        },
        "contactNumber": {
          "type": "string"
        },
        "trainingType": {
          "enum": [
            "Framework",
            "Standard"
          ],
          "type": "string"
        },
        "trainingCode": {
          "type": "string"
        },
        "isEmployerDisabilityConfident": {
          "type": "boolean"
        },
        "employerWebsiteUrl": {
          "type": "string"
        },
        "employerDescription": {
          "type": "string"
        }
      }
    },
    "Location": {
      "type": "object",
      "properties": {
        "addressLine1": {
          "type": "string"
        },
        "addressLine2": {
          "type": "string"
        },
        "addressLine3": {
          "type": "string"
        },
        "addressLine4": {
          "type": "string"
        },
        "addressLine5": {
          "type": "string"
        },
        "postcode": {
          "type": "string"
        },
        "town": {
          "type": "string"
        },
        "additionalInformation": {
          "type": "string"
        }
      }
    },
    "CreateApprenticeshipResponse": {
      "type": "object",
      "properties": {
        "vacancyReferenceNumber": {
          "format": "int32",
          "type": "integer"
        }
      }
    },
    "BadRequestContent": {
      "type": "object",
      "properties": {
        "requestErrors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/BadRequestError"
          }
        }
      }
    },
    "BadRequestError": {
      "type": "object",
      "properties": {
        "errorCode": {
          "type": "string"
        },
        "errorMessage": {
          "type": "string"
        }
      }
    },
    "StringContent": {
      "type": "object",
      "properties": {
        "headers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/KeyValuePair[String,IEnumerable[String]]"
          },
          "readOnly": true
        }
      }
    },
    "KeyValuePair[String,IEnumerable[String]]": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "readOnly": true
        },
        "value": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "readOnly": true
        }
      }
    }
  },
  "tags": []
}

 
This was selected as the best answer
Daniel BleasdaleDaniel Bleasdale
Thank you so much, Swetha.
Really appreciate the help. I have honestly been stuck on this for way too long.
Now I can progress. Once again thanks for the help.
FinnArildMusicFinnArildMusic
I have encountered a similar issue with the "operationId" statement in JSON. Azure API Manager sets in a hash here that Salesforce External services doesn't "Like". If you replace this with a shorter name, it saves fine.