v1

latestOpenAPI 3.0.0Apache License Version 2.02026-07-24163274903.6 KB
Location Service

saveLocationV1

Create a new location. Update a location's details.

post/location/v1/saveLocation

Headers

authenticationtokenstring required

Secure token for API authentication.

passwordstring required

Password for the Crunchtime Application User.

sitenamestring required

Crunchtime site identifier. (test or production)

useridstring required

User ID for the Crunchtime Application User.

X-B3-TraceIdstring

Optional trace identifier for troubleshooting.

Request body

locationCodestring

"Code" from Company setup screen

Example request

{
  "locationAltAddressDetails": [
    {
      "acapCode": "test1",
      "accoCode": "test",
      "altAddressOne": "testAddress1",
      "altAddressTwo": "testAddress2",
      "cdpEMail": "cdp@crunchtime.com",
      "city": "Test City",
      "companyNameForPO": "test",
      "locationCode": "WGT1",
      "stateProvince": "MD"
    }
  ],
  "locationCode": "000000",
  "locationConceptInfoDetails": [
    {
      "conceptCode": "BSC1",
      "conceptName": "BS Concept 1",
      "locationCode": "WGT1",
      "remove": "N"
    }
  ],
  "locationDeliverInfoDetails": [
    {
      "activeFlag": "Y",
      "delete": "N",
      "deliverToName": "MASF11",
      "locationCode": "WGT1"
    }
  ],
  "locationDetailDetails": [
    {
      "allowAutoPost": "N",
      "allowAutoTransfer": "Y",
      "autoCreatePOSRecipe": "N",
      "autoPostDaysOffset": 2,
      "autoPostMethod": "A",
      "autoPrepForDepletion": "N",
      "baseCurrency": "USD",
      "biziqCompDate": "12/03/2023",
      "borrowCnsEndDate": "12/30/2023",
      "borrowCnsLocationCode": "MASF11",
      "buffetQuantityAlertPercent": 32,
      "dailyPrepReview": "Y",
      "earliestPostDateTimeBasedOn": "C",
      "gmtOffset": 3,
      "grandOpeningDate": "12/03/2023",
      "locationCode": "WGT1",
      "lotTracking": "Y",
      "market": "Market 02",
      "missingPrepCheck": "N",
      "optimalDaysOnHand": 22,
      "ownershipEntity": "Crunchtime",
      "posFilePath": "Deprecated",
      "posType": "Squirrel  ",
      "productionQuantityAlertPercent": 65,
      "purchaseType": "M",
      "secMrktPurchase": "Y",
      "smartPicklist": "Y",
      "software": "Epicor Platinum",
      "timezone": 5
    }
  ],
  "locationHoursOfOperationDetails": [
    {
      "closingTime": "16:00",
      "closingTimeCleanup": "20:30",
      "corporateFlag": "N",
      "dayOfWeek": 5,
      "locationCode": "WGT1",
      "openingTime": "10:30",
      "openingTimeSetup": "08:00"
    }
  ],
  "locationLaborDetails": [
    {
      "businessDayBegins": "02:50",
      "corporateFlag": "N",
      "locationCode": "WGT1"
    }
  ],
  "locationNameAddressDetails": [
    {
      "activeFlag": "Y",
      "addressOne": "Addr1",
      "addressTwo": "Addr2",
      "city": "Glacier",
      "country": "USA",
      "eMail": "test@abc.com",
      "locationADRemoteName": "Test 1",
      "locationCode": "WGT1",
      "locationName": "New York",
      "phone": "8008675309",
      "stateProvince": "NJ",
      "zip": "20867"
    }
  ],
  "locationPostDetails": [
    {
      "enabledFlag": "Y",
      "locationCode": "WGT1"
    }
  ],
  "locationSafeLogDetails": [
    {
      "locationCode": "WGT1",
      "safeLogName": "Test Safe",
      "expectedValue": 1000.55,
      "currencyCode": "USD",
      "activeFlag": "Y",
      "noteRequiredForVarianceFlag": "Y",
      "varianceThreshold": 700
    }
  ],
  "locationTimeClockInTwxDetails": [
    {
      "allowTimeClockInMTX": true,
      "allowTimeClockInTWX": true,
      "locationCode": "WGT1",
      "minutesEarly": 10,
      "minutesLate": 5,
      "contentReportingEmail": "email@provider.com; email2@otherprovider.com"
    }
  ]
}

Response

Success

object required