• Resolved jormarques

    (@jormarques)


    Hi,

    Having issues uploading business_hours with the REST API.

    Sending this: [“Mo 7:00AM–7:00PM”,”Tu 7:00AM–7:00PM”,”We 7:00AM–7:00PM”,”Th 7:00AM–7:00PM”,”Fr 7:00AM–10:00PM”,”Sa 7:00AM–10:00PM”,”Su 7:00AM–7:00PM”] and getting:

    slot:? 7:00AM–7:00PM-00:00 , range:? 3:30 pm – 12:00 am ????????

    Really not seeing what is going wrong to have these strange results.

    rendered:?{
    
    days:?{
    
    Mo:?{
    
    today:?
    
    0
    
    ,
    
    closed:?
    
    0
    
    ,
    
    open:?
    
    0
    
    ,
    
    day:?
    
    Monday
    
    ,
    
    day_short:?
    
    Mon
    
    ,
    
    day_no:?
    
    1
    
    ,
    
    slots:?[{
    
    slot:?
    
    7:00AM–7:00PM-00:00
    
    ,
    
    range:?
    
    3:30 pm - 12:00 am
    
    ,
    
    open:?
    
    0
    
    ,
    
    time:?[
    
    1530
    
    ,
    
    0000]
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter jormarques

    (@jormarques)

    Will make some more tests but it seems with the 24hour format is working properly.

    Plugin Support alexrollin

    (@alexrollin)

    Hello,

    glad you got it working.

    Thread Starter jormarques

    (@jormarques)

    Hi,

    So far it’s working well with 24h format, but there’s still couple of issues, I have users that add the hours as:

    “Open 24 hours”, or “Closed”.

    What format/values should I convert to before sending the data? Thank you.

    Thread Starter jormarques

    (@jormarques)

    Hi,

    Any update regarding this? Thank you.

    Plugin Support alexrollin

    (@alexrollin)

    Hello,

    for future reference, to know the expected value structure for any field type, just add a new listing in the site backend and add the values to that field then export.

    This is a listing with 24 hours on Monday, every other day closed.

    ["Mo 00:00-00:00"],["UTC":"+0","Timezone":"UTC"]
    Thread Starter jormarques

    (@jormarques)

    Hi @alexrollin,

    I did, but it was not working, so was waiting for confirmation, because unfortunately making dynamic API requests with different days takes too much unnecessary coding to remove closed days and write 00:00.

    [“Mo 00:00-00:00”],[“UTC”:”+0″,”Timezone”:”UTC”].

    For “00:00-00:00”, it seems, it needs a specific “-” and for closed, it’s better to use: [“Mo 00:00-00:00, Tu -“],[“UTC”:”+0″,”Timezone”:”UTC”] than to send empty data since code compilation will be faster.


    Thanks for the reply, have a good weekend.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Business Hours issue with API’ is closed to new replies.